Lark Messenger icon

Lark Messenger

Lark Messenger Management

Overview

The "Lark Messenger" node enables interaction with the Lark messaging platform, specifically allowing users to manage and retrieve messages. The "Read Chat History" operation under the "Message" resource fetches historical chat messages from a specified chat container (chat ID). This is useful for scenarios such as auditing conversations, backing up chat data, or integrating chat history into other workflows or systems.

Practical examples include:

  • Automatically retrieving recent chat messages for analysis or reporting.
  • Syncing chat history with external databases or CRM systems.
  • Monitoring chat activity for compliance or customer support purposes.

Properties

Name Meaning
Authentication Method of authenticating API requests; options are "Tenant Token" or "OAuth2".
Container Id Type Type of container to read from; currently only supports "chat".
Container Id The unique identifier of the chat (chat ID) whose history is to be read.
Options Additional optional settings:
- Use Custom Body Boolean flag indicating whether to send a custom request body instead of default parameters.

Output

The node outputs JSON data representing the chat messages retrieved from the specified chat container. The structure typically includes message details such as sender information, timestamps, message content, and metadata related to each chat entry.

If binary data were supported (not indicated here), it would represent attachments or media within messages, but this node focuses on JSON message data.

Dependencies

  • Requires access to the Lark Suite Open API endpoint at https://open.larksuite.com/open-apis.
  • Needs an API authentication credential, either a Tenant Token or OAuth2 token, configured in n8n.
  • Proper permissions on the Lark tenant or user account to read chat histories.

Troubleshooting

  • Invalid Authentication: Errors may occur if the provided API token is invalid or expired. Ensure that the correct authentication method is selected and credentials are up to date.
  • Container Id Issues: If the chat ID is incorrect or does not exist, the node will fail to retrieve messages. Verify the chat ID is accurate.
  • Unsupported Container Type: Currently, only "chat" is supported as a container type. Using other values may cause errors.
  • API Rate Limits: Frequent calls might hit rate limits imposed by Lark API, resulting in temporary failures. Implement retries or backoff strategies.
  • Use Custom Body Misconfiguration: Enabling "Use Custom Body" without providing a valid custom payload may lead to malformed requests.

Links and References

Discussion