Lola Messanger Trigger icon

Lola Messanger Trigger

Starts the workflow on a Lola Message is received.

Lola Messanger Trigger

AI-generated

Overview

The Lola Messanger Trigger node is designed to start an n8n workflow when a new message or event is received from the Lola Messenger (integrated with Chatwoot). It acts as a webhook trigger, listening for incoming POST requests at a specific endpoint and processing the payload to output relevant data. This node is particularly useful for automating responses or actions based on messages or events in your Chatwoot-powered chat systems.

Common scenarios:

  • Automatically responding to specific commands (e.g., /ping) sent by users in chat.
  • Triggering workflows when new messages or events are received in a Chatwoot inbox.
  • Integrating Chatwoot conversations with other tools or services via n8n.

Practical example:
When a customer sends a message containing /ping in a Chatwoot conversation, this node can automatically reply with "pong from Lola Trigger" and pass the message details to subsequent workflow steps.


Properties

Name Meaning
Account ID A unique identifier for the account. (Required)
Inbox ID A unique identifier for the inbox.
Token A Chatwoot user token.
chatwootUrl A Chatwoot custom URL.

Output

The node outputs data in three possible streams: msg, list, and events. The structure of the output depends on the type of incoming webhook:

  • For Messages (type: "message"):

    • Output stream: msg
    • Structure:
      {
        "lola_omnichannel": { ... } // Content of the message received
      }
      
  • For Events (type: "event"):

    • Output stream: events
    • Structure:
      {
        "lola_omnichannel": { ... } // Content of the event received
      }
      
  • Other types: No output is produced.

Note:

  • The node does not output binary data; all outputs are JSON objects.
  • The list output stream is defined but not used in the current logic.

Dependencies

  • External Service: Requires access to a Lola/Chatwoot instance.
  • API Key: Needs valid credentials (lolaKeyApi) configured in n8n.
  • Webhook Setup: The node registers a webhook endpoint (chatwood/message) with the external service.

Troubleshooting

Common issues:

  • Missing or invalid credentials: Ensure that the lolaKeyApi credential is correctly set up in n8n.
  • Webhook registration failure: If the webhook cannot be registered, check network connectivity and that the provided Account ID, Inbox ID, Token, and Chatwoot URL are correct.
  • No data received: Verify that the external service is sending webhooks to the correct URL and that the node is active in your workflow.

Error messages:

  • "Pong failed": Indicates an error occurred while attempting to send a "pong" response. Check API credentials and network access.
  • Webhook creation/deletion errors: Usually due to incorrect parameters or lack of permissions.

Links and References

Discussion