WhatsApi icon

WhatsApi

Connect with WhatApp HTTP API

Overview

This node connects to a WhatsApp HTTP API service to interact with WhatsApp chats. Specifically, the "Chat List" operation under the "Chats" resource retrieves a list of chats associated with a given WhatsApp session (phone number). This is useful for scenarios where you want to programmatically access and manage chat conversations, such as displaying recent chats in a dashboard, automating message sending based on chat history, or integrating WhatsApp chat data into other workflows.

Example use cases:

  • Fetching all active chats for a specific WhatsApp account.
  • Monitoring chat activity for customer support automation.
  • Archiving chat lists for analytics or compliance.

Properties

Name Meaning
Phone The session ID representing the WhatsApp phone number to retrieve chats from. This identifies the WhatsApp account/session whose chat list will be fetched.

Output

The node outputs JSON data containing the list of chats retrieved from the WhatsApp API for the specified session. The exact structure depends on the API response but typically includes details like chat IDs, contact names, last message timestamps, and unread message counts.

If the API supports binary data (e.g., media attachments), the node would handle it accordingly, but this operation primarily returns JSON chat metadata.

Dependencies

  • Requires connection to a WhatsApp HTTP API service endpoint.
  • Needs an API authentication token or key configured in the node credentials to authorize requests.
  • The base URL of the WhatsApp API must be set in the node's credential configuration.
  • The session ID (phone number) must correspond to an active WhatsApp session recognized by the API.

Troubleshooting

  • Common issues:

    • Invalid or expired session ID leading to empty or error responses.
    • Incorrect API base URL or missing authentication causing request failures.
    • Network connectivity problems preventing access to the WhatsApp API.
  • Error messages:

    • Authentication errors: Check that the API key/token is correctly configured and valid.
    • "Session not found" or similar: Verify the session ID (phone number) is correct and active.
    • Timeout or network errors: Ensure the API endpoint is reachable from n8n.

Resolving these usually involves verifying credentials, session validity, and network settings.

Links and References

  • WhatsApp HTTP API documentation (refer to your specific API provider)
  • n8n documentation on creating and configuring HTTP API nodes

Discussion