WAREST icon

WAREST

Interact with the WARest WhatsApp REST API

Overview

This node operation fetches chat messages from a specified WhatsApp chat session using the WARest WhatsApp REST API. It allows users to retrieve messages from a particular chat by providing the session ID and chat ID, with optional filters such as message limit, offset, search text, time range, media-only messages, and messages sent only by the user. This is useful for scenarios where users want to analyze chat history, monitor conversations, or integrate chat data into other workflows.

Use Case Examples

  1. Retrieve the last 10 messages from a specific WhatsApp chat for customer support analysis.
  2. Fetch messages containing specific keywords within a chat to monitor important discussions.
  3. Get media-only messages from a chat to archive shared images and videos.

Properties

Name Meaning
Session Identifier of the WhatsApp session from which to fetch chat messages. It can be selected from a list of available sessions or entered manually.
Chat ID / JID The unique identifier of the chat (jid) from which to fetch messages, e.g., a phone number with domain or a group ID.
Additional Fields Optional parameters to refine the message fetch operation, including limit, offset, search text, start and end time filters, media-only filter, and filter for messages sent only by the user.

Output

JSON

  • json - Array or object containing the fetched chat messages from the specified chat session.

Dependencies

  • Requires an API key credential for the WARest WhatsApp REST API and the base URL of the API server.

Troubleshooting

  • Ensure the session ID and chat ID are correct and correspond to active sessions and chats in the WARest system.
  • Check API credentials and base URL configuration to avoid authentication or connection errors.
  • If no messages are returned, verify the filter parameters such as limit, offset, search text, and time range to ensure they match existing messages.
  • Common error: 'Operation "getChatMessages" is not implemented yet' indicates a misconfiguration or unsupported operation; verify the node settings.

Links

Discussion