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, for the Contact resource and the Get Contact operation, it retrieves detailed information about a WhatsApp contact using their unique identifier (phone number combined with a domain suffix).

Common scenarios where this node is beneficial include:

  • Fetching contact details to personalize messages or workflows.
  • Verifying if a contact exists before sending communications.
  • Integrating WhatsApp contact data into CRM or customer support systems.

For example, you might use this node to get the profile information of a user who just sent a message, enabling your workflow to respond with personalized content.

Properties

Name Meaning
Contact ID The WhatsApp contact identifier in the format: phone number with country code + @s.whatsapp.net. For example, 1234567890@s.whatsapp.net. This uniquely identifies the contact whose details you want to retrieve.

Output

The node outputs JSON data representing the contact's details as returned by the WSAPI WhatsApp API. This typically includes fields such as the contact's name, status, profile picture URL, and other metadata associated with the WhatsApp contact.

If the node supports binary data output (not explicitly shown here), it would likely be used for media such as profile pictures, but for the "Get Contact" operation, the primary output is structured JSON data about the contact.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API service.
  • Needs an API key credential configured in n8n to authenticate requests to the WSAPI endpoint.
  • The base URL for the WSAPI must be set in the credentials configuration.

Troubleshooting

  • Invalid Contact ID Format: Ensure the Contact ID follows the required format (phoneNumber@s.whatsapp.net). Missing the domain suffix or incorrect phone number formatting will cause errors.
  • Contact Not Found: If the contact does not exist or is not registered on WhatsApp, the API may return an error or empty response.
  • Authentication Errors: Verify that the API key credential is correctly configured and has sufficient permissions.
  • Network Issues: Check connectivity to the WSAPI endpoint and ensure the base URL is correct.
  • Unhandled Operation or Resource: If the node throws errors about unknown resources or operations, confirm that "contacts" is selected as the resource and "get" as the operation.

Links and References

Discussion