Lola Response Composer icon

Lola Response Composer

Lola Response Composer, a node to compose a message response structure to send back to customer

Lola Response Composer

AI-generated

Overview

The Lola Response Composer node is designed to construct and optionally send a structured message response, typically for customer support or chatbot scenarios. It allows you to compose messages with dynamic content, translation, alternative texts, attachments (images/PDFs), and advanced parameterization. The node can append responses to chat history and directly send messages via Lola Messenger (with options for private messaging). This node is especially useful in workflows where automated, context-aware, and multi-language responses are required, such as:

  • Automated replies in customer support chats.
  • Sending personalized notifications or follow-ups.
  • Integrating with platforms like Telegram, Slack, WhatsApp, or Chatwoot.

Example use cases:

  • Automatically responding to customer queries with translated answers.
  • Sending images or documents as part of a support conversation.
  • Using variable placeholders to personalize messages based on workflow data.

Properties

Name Meaning
Quick Send - Only Available for Lola Messanger Whether to send the message directly to Lola Messenger. If enabled, the message is sent out immediately.
Private Message Whether to send the message as a private message (visible only to the support agent). Only available if "Quick Send" is enabled.
Use Message Composer Whether to load routing information from Lola Message Composer. If disabled, manual entry of source/account/chat IDs is required.
Source ID The source ID of the message (useful for tracking in command executions, e.g., telegram, slack, discord, etc.). Only shown if "Use Message Composer" is disabled.
Chat Identifier / Conversation ID A chat identifier to identify the chat session. Required if "Use Message Composer" is disabled.
Account ID The account ID of the message. Only shown if "Use Message Composer" is disabled.
Append Response To Chat History Whether to append the response to the chat history.
From Indicates who the message is from. Options: AI (when the message is from the AI), Human (when the message is from the user). Only shown if "Append Response To Chat History" is enabled.
Output Text The message to send back to the customer. Supports variable replacement and can be translated or randomized.
Enable Translate Whether to enable auto-translation of the final text.
Read Lang From Message Whether to read the language code from the incoming message. Only shown if "Enable Translate" is enabled.
Language Code The language code (ISO 639-1, e.g., en, es, fr) to translate the final text into. Required if "Enable Translate" is enabled.
Enable Alternative Texts Whether to enable alternative texts; execution will pick one randomly.
Alternative Texts List of alternative texts to send back to the customer. You can use {variableName} placeholders. Only shown if "Enable Alternative Texts" is enabled.
Parameters Additional parameters for variable replacement in the output text. Types:
• JSON: name/value pairs (value as JSON)
• Callback Link: link details
• String: name/value pairs (string)
Image/PDF URL The image or PDF URL to send back to the customer (optional).
Image Content (Base64) The image content encoded in Base64 to send back to the customer (optional).
Image File Name The file name for the attached image (optional).

Output

The node outputs a field named lola_response_message within the json property of the item. Its structure includes:

{
  "wasTranslated": false,         // true if translation was performed
  "chatId": "...",                // Chat/conversation identifier used
  "sourceId": "...",              // Source ID (if provided)
  "lang": "...",                  // Language code used for the message
  "text": "...",                  // Final composed message text (after replacements, translation, etc.)
  "inHistory": true,              // true if appended to chat history
  "status": "pending" | "sent"    // Status of the message ("sent" if quick send succeeded, otherwise "pending")
}

If an image or file is included, its URL, base64 content, and filename are handled internally and may be referenced in the outgoing message, but are not directly exposed in the output unless included in the text.


Dependencies

  • External Services:
    • If "Quick Send" is enabled, requires access to Lola Messenger and possibly Chatwoot integration.
    • Translation functionality depends on external translation services (as implemented in the workflow).
  • n8n Credentials:
    • Optionally uses lolaKeyApi credentials if configured.
  • Environment Variables:
    • None explicitly required by this node, but dependent services may require their own configuration.

Troubleshooting

Common Issues:

  • Missing Required Fields:
    • If required fields (e.g., Chat ID, Output Text) are missing, the node will throw an error.
  • No Lola Message Composer Node:
    • If "Use Message Composer" is enabled but no prior Lola Message Composer node exists in the workflow, an error is thrown:
      "No Lola Message Composer node found in the workflow"
  • Unsupported Source:
    • If the message source is not "chatwoot" when using Quick Send, the node throws:
      "Only Chatwoot messages are supported"
  • Translation Errors:
    • If translation fails, the error is logged but does not stop execution; the original text is used.
  • API/Network Errors:
    • If sending the message fails (e.g., network/API issues), the error is logged and surfaced as a node operation error.

How to resolve:

  • Ensure all required properties are set and visible according to display conditions.
  • Make sure upstream nodes provide the expected data structure.
  • Verify that any necessary credentials and integrations are properly configured.

Links and References


Discussion