WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

Chats → Sync Chat Messages

AI-generated

Overview

The node integrates with the WaliChat WhatsApp API to synchronize chat messages from a specified WhatsApp number and chat. It allows users to fetch recent messages in a chat, supporting pagination and limiting the number of messages retrieved per request. This is useful for scenarios such as backing up chat history, analyzing conversations, or integrating WhatsApp chat data into other workflows or CRMs.

For example, a user can sync the last 50 messages from a specific WhatsApp group chat or individual chat by specifying the WhatsApp number and chat ID, then process or store these messages downstream in n8n.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) to use for syncing messages. This is selected from available devices.
Chat ID The unique identifier of the chat to sync messages from. Examples: 447362053576@c.us for a user chat, or 44736205357600000000@g.us for a group chat.
Maximum Messages The maximum number of recent messages to retrieve from the chat. Defaults to 50.
Page Number The page number for paginated results, starting from 0. Allows fetching subsequent batches of messages.

Output

The node outputs an array of JSON objects representing the synchronized chat messages. Each object corresponds to a message fetched from the specified chat. The exact structure of each message object depends on the WaliChat API response but typically includes details such as message content, sender info, timestamps, and message status.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the WaliChat WhatsApp API.
  • Needs an API key credential configured in n8n for authenticating requests to the WaliChat service.
  • The node dynamically loads available WhatsApp numbers (devices) via a method named getDevices.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp number/device ID may cause failures in fetching messages.
    • Incorrect chat ID format will result in errors or empty results.
    • Pagination parameters out of range might return no data.
    • API authentication errors if the API key is invalid or expired.
  • Error messages:

    • Errors returned from the WaliChat API are surfaced as error messages in the node output.
    • If "Continue On Fail" is enabled, errors for individual items are included in the output JSON under an error field.
    • To resolve, verify the WhatsApp number and chat ID inputs, ensure valid API credentials, and check network connectivity.

Links and References

Discussion