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
The "Update The Workforce Type" operation in the "Workforce Type" resource allows users to modify an existing workforce type enumeration within Lark Contacts. This node is useful for updating metadata related to workforce classifications, such as changing the display content, status, or localized names of a workforce type.
Typical use cases include:
- Updating the name or description of a workforce type.
- Changing the status (e.g., active/inactive) of a workforce type.
- Providing localized content for different languages/locales.
- Customizing the update payload with a fully custom JSON body if needed.
For example, a company might want to rename a workforce category from "Contractor" to "Freelancer" and provide translations for multiple locales.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication: either "Tenant Token" or "OAuth2". |
| Enum Id | The unique identifier of the workforce type enum to update (required). |
| Content | The main content or name of the workforce type. |
| Enum Status | Numeric status code representing the state of the enum (e.g., 0 for active). |
| Enum Type | Numeric type classification of the enum. |
| I 18 N Content | Localized content entries; each item includes a locale (language/region code) and a value. |
| Custom Body | A JSON object allowing full customization of the request body sent to the API. |
| Options > Use Custom Body | Boolean flag to indicate whether to send the custom JSON body instead of individual fields. |
Output
The node outputs JSON data representing the response from the Lark Contacts API after updating the workforce type. This typically includes confirmation of the updated enum details or error information if the update failed.
No binary data output is involved in this operation.
Dependencies
- Requires an API authentication credential, either a Tenant Token or OAuth2 token, configured in n8n.
- Connects to the Lark Suite Open APIs endpoint at
https://open.larksuite.com/open-apis. - Proper permissions on the Lark Contacts API to update workforce types are necessary.
Troubleshooting
- Missing or invalid Enum Id: The update will fail if the Enum Id is not provided or incorrect. Ensure the Enum Id corresponds to an existing workforce type.
- Authentication errors: If the API key/token is missing, expired, or lacks permissions, the node will return authorization errors. Verify credentials and scopes.
- Invalid JSON in Custom Body: When using the custom body option, malformed JSON will cause request failures. Validate JSON syntax before sending.
- Incorrect field values: Fields like
enum_statusandenum_typeexpect numeric values; providing strings or invalid numbers may cause errors. - API rate limits or network issues: Temporary failures can occur due to rate limiting or connectivity problems. Retry after some time or check network settings.
