WAHA API icon

WAHA API

Complete WhatsApp automation with WAHA API - Multi-engine support

Overview

This node integrates with the WAHA API to manage WhatsApp contacts and perform various operations on them. Specifically, the "Unblock Contact" operation allows users to unblock a previously blocked contact in WhatsApp via the WAHA API.

Common scenarios for this node include:

  • Automating customer support workflows where contacts might be blocked/unblocked based on interaction status.
  • Managing contact lists programmatically in bulk or triggered by external events.
  • Integrating WhatsApp contact management into broader automation pipelines.

For example, if a user accidentally blocks a contact or wants to restore communication with a contact after resolving an issue, this node can unblock that contact automatically.

Properties

Name Meaning
Session Name The name of the WhatsApp session to use (defaults to the credential's default session).
Chat ID The WhatsApp chat ID of the contact to unblock. Format: phone number with @c.us suffix.
Additional Fields A collection of optional fields (not specifically used for unblocking but available generally).

The Additional Fields collection includes options like Filename, Mimetype, Link Description, Link Title, Contact Name, Contact Number, Reaction emoji, Limit, and Download Media flag, but these are not relevant for the unblock contact operation.

Output

The node outputs the JSON response returned by the WAHA API after attempting to unblock the contact. This typically contains information about the success or failure of the unblock request.

The output structure is:

{
  "json": {
    // API response data indicating unblock status
  },
  "pairedItem": {
    "item": <index_of_input_item>
  }
}

No binary data is output by this operation.

Dependencies

  • Requires a valid WAHA API credential with an API key and base URL configured in n8n.
  • Optionally uses an additional API key credential for validating subscription via the n8n Tools API.
  • The node sends HTTP requests to the WAHA API endpoints to perform actions.
  • Requires the WhatsApp session to be active and identified by the session name.

Troubleshooting

  • Invalid Credentials: If the WAHA API key or session name is incorrect, the node will fail. Verify credentials and session configuration.
  • Unauthorized Errors: The node validates subscription via the n8n Tools API; errors like 401 or 403 indicate invalid or expired API keys.
  • Unknown Operation or Resource: If the operation or resource parameters are misconfigured, the node throws errors indicating unknown operations.
  • Chat ID Format: Ensure the Chat ID is correctly formatted as a phone number with @c.us suffix or a group ID.
  • Session Not Active: The session specified must be active; otherwise, the API call will fail.

Links and References

  • WAHA API Documentation (general reference for WhatsApp automation)
  • n8n Documentation for configuring credentials and using HTTP Request nodes
  • WhatsApp Business API concepts for understanding chat IDs and contact management

Discussion