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 allows partial modification of department information within the Lark Contacts system. It is useful for updating specific fields of a department without needing to resend the entire department data. Common scenarios include changing the department name, leader, order, or parent department, or updating localized names and associated unit IDs. For example, an HR automation workflow might update the department leader or reorder departments dynamically based on organizational changes.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication: either "Tenant Token" or "OAuth2". |
| Department Id | The unique identifier of the department to modify. Must match the department ID type used in queries. |
| Create Group Chat | Boolean flag indicating whether to create a group chat for the department. |
| I 18 N Name | Localized names for the department in multiple languages (en_us, ja_jp, zh_cn). |
| Leader User Id | User ID of the department leader. |
| Name | The new name of the department. |
| Order | The order index of the department for sorting purposes. |
| Parent Department Id | The ID of the parent department under which this department falls. |
| Unit Ids | List of unit IDs associated with the department. |
| Custom Body | JSON object allowing users to specify a fully custom request body instead of using individual fields. |
| Options > Use Custom Body | Boolean option to toggle between using the custom JSON body or the individual fields above. |
Output
The node outputs JSON data representing the response from the Lark Contacts API after modifying the department. This typically includes confirmation of the updated fields and any metadata returned by the API. There is no binary output.
Dependencies
- Requires access to the Lark Suite Open APIs.
- Requires 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 modify department information in the Lark Contacts system are necessary.
Troubleshooting
- Invalid Department Id: Ensure the department ID provided exists and matches the expected format.
- Authentication Errors: Verify that the selected authentication method is correctly configured and the token or OAuth2 credentials are valid.
- Permission Denied: The authenticated user must have rights to modify department details.
- Malformed Custom Body: If using the custom JSON body, ensure it is valid JSON and conforms to the API schema.
- API Rate Limits: Frequent updates may hit rate limits; consider adding delays or retries.
