Lark Contacts icon

Lark Contacts

Lark Contacts Management

Overview

The "Delete A Department" operation in the Lark Contacts node allows users to remove a specific department from their organization's contact directory managed via Lark's API. This is useful for maintaining an up-to-date organizational structure by removing obsolete or incorrect departments.

Typical use cases include:

  • Automating cleanup of departments that are no longer active.
  • Integrating with HR systems to reflect organizational changes automatically.
  • Managing departmental data programmatically without manual intervention in the Lark admin console.

Properties

Name Meaning
Authentication Method used to authenticate API requests. Options: Tenant Token, OAuth2.
Department Id The unique identifier of the department to delete. Must match the expected ID type in the query.
Options Additional optional settings. Currently supports: Use Custom Body (boolean) to send a custom request body instead of default.

Output

The node outputs JSON data representing the response from the Lark API after attempting to delete the specified department. This typically includes status information indicating success or failure of the deletion request.

No binary data output is involved in this operation.

Dependencies

  • Requires valid authentication credentials, either a tenant token or OAuth2 token, configured in n8n.
  • Depends on access to the Lark Suite Open API endpoint at https://open.larksuite.com/open-apis.
  • Proper permissions to delete departments within the Lark organization.

Troubleshooting

  • Invalid Department Id: If the department ID does not exist or is incorrect, the API will return an error. Verify the department ID before running the node.
  • Authentication Errors: Ensure that the provided authentication method and credentials are valid and have sufficient permissions.
  • API Rate Limits: Frequent calls may hit rate limits imposed by Lark API; consider adding delays or retries.
  • Use Custom Body Option: If enabled incorrectly, the custom body might cause malformed requests leading to errors. Use only if you understand the required request format.

Links and References

Discussion