WAHA icon

WAHA

Connect with Whatsapp HTTP API

Overview

This node operation retrieves chat messages from a specified chat session. It is useful for scenarios where you need to fetch historical or recent messages from a chat for analysis, monitoring, or integration with other systems. For example, you can use it to download media files from messages, filter messages by timestamp, or paginate through messages using limit and offset parameters.

Use Case Examples

  1. Fetching the last 100 messages from a chat session to analyze customer support interactions.
  2. Downloading media files attached to chat messages for archival purposes.
  3. Filtering messages sent after a specific timestamp to track recent conversations.

Properties

Name Meaning
Session The name of the chat session from which to retrieve messages.
Download Media Whether to download media files attached to the messages.
Limit The maximum number of messages to retrieve.
Offset The number of messages to skip before starting to collect the result set.
Filter Timestamp Lte Filter to include messages before or at this timestamp.
Filter Timestamp Gte Filter to include messages after or at this timestamp.
Filter From Me Filter messages to include only those sent by the user (true) or all messages (false).
Chat Id The unique identifier of the chat from which to retrieve messages.
Request Options Additional request settings such as batching, SSL handling, proxy, and timeout.

Output

JSON

  • messages - Array of chat messages retrieved from the specified chat.
  • media - Media files downloaded for messages if the downloadMedia option is enabled.

Dependencies

  • An API key credential or authentication token for accessing the chat service API.

Troubleshooting

  • Ensure the session name and chat ID are correct and exist in the chat service to avoid empty or error responses.
  • If media download is enabled but media files are not retrieved, check network connectivity and permissions for media access.
  • Timeout errors may occur if the server is slow or unresponsive; increase the timeout setting if needed.
  • SSL certificate errors can be bypassed by enabling the 'Ignore SSL Issues' option, but this reduces security.

Discussion