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 integrates with the Lark Contacts API to associate a department with a unit within an organizational structure. It is useful for managing and organizing contacts by linking departments to specific units, which can help in maintaining hierarchical relationships and streamlining contact management workflows.
Practical examples include:
- Automatically linking newly created departments to their respective units.
- Synchronizing organizational changes from an HR system into Lark's contact management.
- Structuring contact data for reporting or access control based on unit-department associations.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
Department Id | The unique identifier of the department to associate with a unit. |
Department Id Type | The type or format of the department ID (e.g., internal ID, external ID). |
Unit Id | The unique identifier of the unit to which the department will be associated. |
Use Custom Body | Boolean flag indicating whether to send a custom JSON body instead of the standard fields. |
Custom Body | A JSON object allowing full customization of the request body, overriding standard inputs. |
Output
The node outputs JSON data representing the response from the Lark Contacts API after attempting to associate the specified department with the unit. This typically includes confirmation of the association or error details if the operation failed.
If binary data were involved (not indicated here), it would represent files or media related to the contact entities, but this node focuses solely on JSON responses.
Dependencies
- Requires valid authentication credentials via 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
. - No additional external dependencies beyond the API credentials and network access.
Troubleshooting
- Invalid Credentials: Errors related to authentication usually mean the provided token is expired, missing, or incorrect. Verify and refresh your API credentials.
- Missing or Incorrect IDs: Ensure that the Department Id, Department Id Type, and Unit Id are correctly specified and correspond to existing entities in Lark.
- API Rate Limits: If you encounter rate limit errors, consider adding delays between requests or checking your API usage quotas.
- Custom Body Issues: When using the custom body option, ensure the JSON is well-formed and matches the expected API schema to avoid request failures.