Actions38
- User Actions
- Department Actions
- User Group Actions
- User Group Member Actions
- Unit Actions
- Workforce Type Actions
- Custom User Field Actions
- Contact Scope Actions
Overview
This node is designed to manage "Workforce Types" within the Lark Contacts system, specifically allowing users to delete existing workforce type entries by their Enum ID. It is useful in scenarios where an organization needs to clean up or remove outdated or incorrect workforce type classifications from their contact management system.
For example, if a company has restructured and certain workforce categories are no longer relevant, this node can be used to programmatically delete those categories by specifying their unique Enum IDs.
Properties
Name | Meaning |
---|---|
Authentication | Method of authenticating API requests. Options: Tenant Token, OAuth2 |
Enum Id | The unique identifier (Enum ID) of the workforce type to delete. This is required. |
Options | Additional options for the request. Currently supports: Use Custom Body (boolean flag) |
- Authentication: Choose how the node authenticates with the Lark API.
- Enum Id: Specifies which workforce type entry to delete.
- Options > Use Custom Body: If enabled, allows sending a custom request body instead of the default.
Output
The node outputs JSON data representing the response from the Lark API after attempting to delete the specified workforce type. Typically, this will include status information indicating success or failure of the deletion operation.
If the API returns any binary data (unlikely in a delete operation), it would be included accordingly, but based on the operation, output is expected to be purely JSON.
Dependencies
- Requires access to the Lark Suite Open APIs.
- Needs either a Tenant Token or OAuth2 credentials configured in n8n for authentication.
- The base URL for API requests is
https://open.larksuite.com/open-apis
. - Proper permissions to delete workforce types in the Lark Contacts system.
Troubleshooting
- Invalid Enum ID: If the Enum ID does not exist or is incorrect, the API will likely return an error indicating the resource was not found. Verify the Enum ID before running the node.
- Authentication Errors: Using invalid or expired credentials will cause authentication failures. Ensure that the Tenant Token or OAuth2 token is valid and has necessary scopes.
- Permission Denied: Insufficient permissions to delete workforce types will result in authorization errors. Confirm user roles and API permissions.
- Use Custom Body Misconfiguration: Enabling "Use Custom Body" without providing a proper body may cause malformed requests. Only enable if you intend to customize the request payload.
Links and References
- Lark Suite Open API Documentation
- Lark Contacts API Reference (for workforce type deletion specifics)