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 users to update the complete information of a department within the Lark Contacts system. It is useful for scenarios where an entire department's details need to be modified at once, such as changing the department name, leader, parent department, or other metadata. For example, an HR automation workflow could use this node to synchronize department changes from an external system into Lark Contacts.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: "Tenant Token" or "OAuth2". |
Department Id | The unique identifier of the department to update. Must match the department_id_type in query parameters. |
Create Group Chat | Boolean flag indicating whether to create a group chat for the department. |
I 18 N Name | Localized names of the department in different languages (en_us, ja_jp, zh_cn). |
Leader User Id | User ID of the department leader. |
Name | Name of the department. |
Order | Sorting order of the department. |
Parent Department Id | 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 full customization of the request body sent to the API 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 the JSON response returned by the Lark Contacts API after updating the department information. This typically includes confirmation of the update and any relevant metadata about the updated department. The output does not include binary data.
Dependencies
- Requires an API key credential for authentication, either via a Tenant Token or OAuth2.
- Needs network access to the Lark Suite Open APIs endpoint (
https://open.larksuite.com/open-apis
). - Proper configuration of credentials in n8n is necessary before using this node.
Troubleshooting
- Common issues:
- Invalid or expired authentication tokens will cause authorization errors.
- Providing a
department_id
that does not exist or mismatches the expected type may result in "not found" or validation errors. - Incorrectly formatted JSON in the Custom Body field can cause request failures.
- Error messages:
- Authorization errors: Check that the API credentials are valid and have sufficient permissions.
- Validation errors: Ensure all required fields are correctly filled and consistent with API expectations.
- Network errors: Verify internet connectivity and that the Lark API endpoint is reachable.