Chat Data icon

Chat Data

Basic Chat Data Node

Overview

The node interacts with a chat data API to perform various actions related to chatbots, leads, conversations, and triggers. Specifically, the Get Conversations operation under the Action resource retrieves conversation records associated with a specified chatbot. It supports filtering by lead ID, date range, source, and limits the number of results returned.

This node is useful for workflows that need to analyze or process chat conversations from different sources linked to a chatbot, such as customer support chats, sales interactions, or automated bot conversations. For example, you could use it to fetch recent conversations for sentiment analysis, reporting, or triggering follow-up actions based on conversation content.

Properties

Name Meaning
Chatbot Name or ID Select a chatbot from the list or specify its ID via expression. Identifies which chatbot's conversations to retrieve.
Limit Maximum number of conversation records to return. Must be at least 1.
Additional Fields Optional filters to refine the query:
- Lead ID Filter conversations by a specific lead's unique identifier.
- Start Date Retrieve conversations created after this date/time.
- End Date Retrieve conversations created before this date/time.
- Source Filter conversations by their origin/source. Options include: All Sources, API, Chat Data Site, Discord, Iframe, Messenger, Slack, WhatsApp, Widget.

Output

The output is an array of JSON objects, each representing a conversation record retrieved from the API. Each item contains the full conversation data as provided by the chat data service, including metadata such as timestamps, participants, messages, and source information.

No binary data output is produced by this operation.

Example output structure (simplified):

[
  {
    "conversationId": "string",
    "leadId": "string",
    "chatbotId": "string",
    "source": "string",
    "createdAt": "timestamp",
    "messages": [
      {
        "role": "string",
        "content": "string",
        "timestamp": "timestamp"
      }
    ],
    ...
  }
]

Dependencies

  • Requires an API key credential for authenticating with the external chat data API.
  • The node configuration must include the base URL of the chat data API.
  • The API endpoints used are under /api/v2/get-conversations/{chatbotId}.
  • The node uses HTTP GET requests with query parameters for filtering and pagination.

Troubleshooting

  • Common issues:

    • Missing or incorrect API base URL in credentials will cause failures.
    • Invalid or expired API key will result in authorization errors.
    • Providing invalid date formats for start/end dates may cause request errors.
    • Requesting more results than allowed or setting limit to zero will cause validation errors.
  • Error messages:

    • "Base URL is missing in credentials." — Check your API credentials configuration.
    • "Failed to fetch chatbots" — Network or authentication issue when loading chatbot options.
    • "Invalid response format. Expected chatbots array." — Unexpected API response; verify API availability.
    • API error responses with "status":"error" and a message — Usually indicates a problem with request parameters or server-side issues.
    • JSON parsing errors in body — Ensure all input fields like dates and IDs are correctly formatted.
  • How to resolve:

    • Verify API credentials and base URL.
    • Use valid chatbot IDs obtained from the node’s dynamic options.
    • Confirm date/time inputs are valid ISO strings or compatible formats.
    • Enable "Continue On Fail" if partial success is acceptable in batch operations.

Links and References

Discussion