WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to perform various operations related to WhatsApp resources. Specifically, the Contact - Subscribe to Presence operation allows users to subscribe to presence updates of a WhatsApp contact. This means the node can monitor and receive real-time presence status changes (such as online/offline) for a specified WhatsApp contact.

Common scenarios:

  • Monitoring when a specific contact becomes online or offline.
  • Building workflows that react to a contact’s presence status, e.g., sending notifications or triggering other automations.
  • Integrating WhatsApp presence information into CRM or customer support systems.

Practical example:
You want to track when a VIP client is online on WhatsApp to initiate a timely chat or support session. By subscribing to their presence, your workflow can automatically detect their availability and notify your team.

Properties

Name Meaning
Contact ID The unique identifier of the WhatsApp contact to subscribe to presence updates for. Format: phone number with country code followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net).

Output

The node outputs JSON data representing the result of the subscription request. Typically, this will include confirmation of the subscription status or any relevant metadata returned by the WSAPI WhatsApp API.

If the node supports binary data output (not explicitly shown here), it would represent media or file content related to the contact or presence updates, but for this operation, the output is primarily JSON-based presence subscription data.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The base URL for the WSAPI must be set in the credentials configuration.
  • No additional external dependencies are indicated.

Troubleshooting

  • Invalid Contact ID format: Ensure the Contact ID follows the required format (phoneNumber@s.whatsapp.net). Missing country codes or incorrect suffixes will cause errors.
  • Authentication errors: Verify that the API key credential is correctly configured and has sufficient permissions.
  • Subscription failures: If the API returns errors about subscription limits or invalid contacts, check the contact exists and the WSAPI service supports presence subscriptions for that contact.
  • Network issues: Confirm that the base URL is reachable from the n8n instance and no firewall blocks the requests.

Links and References

Discussion