Lark Contacts icon

Lark Contacts

Lark Contacts Management

Overview

This node integrates with Lark's Contacts API to manage user group members. Specifically, the "Add Members To A User Group" operation allows you to add one or more members to a specified user group within your Lark workspace. This is useful for automating team management tasks such as onboarding new employees, organizing users into groups for communication or permissions, and maintaining up-to-date group memberships.

Practical examples include:

  • Automatically adding new hires to relevant project or department groups.
  • Syncing external user lists with Lark user groups.
  • Managing access control by grouping users dynamically based on roles or projects.

Properties

Name Meaning
Authentication Method of authenticating API requests. Options: Tenant Token, OAuth2
Group Id The unique identifier of the user group to which members will be added (required)
Member Id Identifier of the member to add to the group
Member Id Type Specifies the type of the member ID (e.g., user ID, email)
Member Type Type of the member being added (e.g., user, bot)
Custom Body JSON object allowing custom request body content instead of standard parameters
Use Custom Body Boolean flag to indicate whether to send the custom JSON body instead of individual fields

Output

The node outputs JSON data representing the response from the Lark Contacts API after attempting to add members to the user group. This typically includes confirmation of success or details about any errors encountered. The output does not explicitly handle binary data.

Dependencies

  • Requires an active connection to Lark's Open APIs.
  • Needs either a Tenant Token or OAuth2 authentication credential configured in n8n.
  • Network access to https://open.larksuite.com/open-apis must be available.

Troubleshooting

  • Common issues:
    • Invalid or expired authentication tokens can cause authorization failures.
    • Incorrect or missing Group Id will result in errors indicating the group was not found.
    • Improperly formatted member information may lead to validation errors.
  • Error messages:
    • Authorization errors suggest checking and refreshing credentials.
    • "Group not found" errors require verifying the Group Id.
    • Validation errors on member fields mean reviewing the input format and required fields.
  • Using the "Custom Body" option incorrectly might cause malformed requests; ensure JSON syntax is valid.

Links and References

Discussion