Lark Contacts icon

Lark Contacts

Lark Contacts Management

Overview

This node manages Lark Contacts, specifically focusing on operations related to the "Department" resource. The "Change Department Group To Common Group" operation allows users to change a department's group status to a common group within the Lark platform. This is useful for organizing departments under a shared or common grouping, which can simplify management and permissions.

Practical examples include:

  • Consolidating multiple specialized departments into a single common group for easier communication.
  • Updating organizational structure dynamically by changing department groups without manual intervention in the Lark admin console.

Properties

Name Meaning
Authentication Method of authenticating API requests. Options: Tenant Token, OAuth2
Department Id The unique identifier of the department to be changed to a common group
Use Custom Body Boolean flag to indicate if a custom JSON body should be sent instead of the standard body
Custom Body A JSON object allowing full customization of the request body when "Use Custom Body" is true

Output

The node outputs JSON data representing the response from the Lark API after attempting to change the department group. This typically includes success status, any updated department information, or error details if the operation failed.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Lark Open 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 must be granted to the API credentials to modify department groups.

Troubleshooting

  • Common Issues:

    • Invalid or missing Department Id will cause the API call to fail.
    • Insufficient permissions on the provided API credentials may result in authorization errors.
    • Using a malformed custom JSON body can lead to request rejection.
  • Error Messages:

    • Unauthorized / 401: Check that the API credentials are valid and have the necessary scopes.
    • Bad Request / 400: Verify the Department Id and the JSON structure if using a custom body.
    • Not Found / 404: The specified Department Id does not exist; confirm the ID is correct.

Resolving these usually involves verifying input parameters, ensuring correct authentication setup, and confirming API access rights.

Links and References

Discussion