Lark Contacts icon

Lark Contacts

Lark Contacts Management

Overview

This node interacts with the Lark Contacts API to obtain a list of departments associated with a specific organizational unit. It is useful in scenarios where you need to programmatically retrieve department information within a company’s organizational structure managed in Lark. For example, HR automation workflows can use this node to fetch all departments under a particular unit for reporting or synchronization with other systems.

Properties

Name Meaning
Authentication Method of authentication to access the Lark API. Options: Tenant Token, OAuth2
Unit Id The unique identifier of the organizational unit whose associated departments are fetched
Options Additional options for the request
- Use Custom Body Whether to send a custom request body instead of default query parameters

Output

The node outputs JSON data representing the list of departments associated with the specified unit. This typically includes department details such as department IDs, names, and possibly hierarchical information. The output is structured as an array of department objects under the json field of each item.

No binary data output is indicated by the source code or properties.

Dependencies

  • Requires valid authentication credentials for the Lark API, either via a tenant token or OAuth2.
  • The node makes HTTP requests to the Lark Suite open APIs endpoint (https://open.larksuite.com/open-apis).
  • Proper configuration of authentication credentials in n8n is necessary.

Troubleshooting

  • Invalid or missing Unit Id: Ensure that the Unit Id property is correctly set; otherwise, the API call will fail or return no results.
  • Authentication errors: If the provided credentials are invalid or expired, the node will not be able to authenticate with the Lark API. Refresh or reconfigure credentials as needed.
  • API rate limits or network issues: Temporary failures may occur due to rate limiting or connectivity problems. Retrying after some time or checking network settings can help.
  • Use Custom Body option misuse: Enabling "Use Custom Body" without providing a proper body might cause the request to fail. Only enable if you intend to customize the request payload.

Links and References

Discussion