Lark Contacts icon

Lark Contacts

Lark Contacts Management

Overview

The node "Lark Contacts" provides management capabilities for contacts within the Lark platform. Specifically, the "Modify Unit Information" operation under the "Unit" resource allows users to update details of an organizational unit (such as a department or team) in Lark Contacts.

This operation is useful when you need to programmatically change unit attributes like its name, enabling automation of organizational updates without manual intervention in the Lark admin console. For example, if your company restructures teams or renames departments, this node can be used in workflows to keep contact units up-to-date automatically.

Properties

Name Meaning
Authentication Method of authenticating API requests. Options: "Tenant Token" or "OAuth2".
Unit Id The unique identifier of the unit to modify. Required to specify which unit to update.
Name New name for the unit. Used to rename the unit.
Use Custom Body Boolean flag indicating whether to send a custom JSON body instead of standard fields.
Custom Body JSON object representing a fully custom request body to send when "Use Custom Body" is enabled.

Output

The node outputs JSON data representing the response from the Lark Contacts API after modifying the unit information. This typically includes confirmation of the updated unit details or error information if the modification failed.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Lark Open Platform API.
  • Needs either a Tenant Token or OAuth2 authentication credential configured in n8n.
  • The base URL for API requests is https://open.larksuite.com/open-apis.
  • Proper permissions on the Lark tenant to modify contact units are necessary.

Troubleshooting

  • Invalid Unit Id: If the provided Unit Id does not exist or is incorrect, the API will return an error. Verify the Unit Id before running the node.
  • Authentication Errors: Using invalid or expired credentials will cause authentication failures. Ensure that the Tenant Token or OAuth2 token is valid and has required scopes.
  • Malformed Custom Body: When using the custom body option, ensure the JSON is correctly formatted and matches the API schema; otherwise, the request will fail.
  • Permission Denied: Lack of sufficient permissions in Lark to modify units will result in authorization errors.
  • API Rate Limits: Excessive requests may trigger rate limiting by Lark's API. Implement retry logic or reduce request frequency if needed.

Links and References

Discussion