WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node enables sending text messages via the WSAPI WhatsApp API. It is designed to send plain text messages to individual WhatsApp contacts or groups by specifying their unique WhatsApp IDs. This functionality is useful for automating communication workflows such as customer support notifications, marketing messages, alerts, or any scenario where programmatic WhatsApp messaging is needed.

For example, you can use this node to:

  • Send order confirmation messages to customers.
  • Notify a group about an event update.
  • Automate reminders or alerts to specific contacts.

Properties

Name Meaning
To The WhatsApp contact ID or group ID to which the message will be sent. For contacts, it must be the phone number with country code (no plus sign) followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net). For groups, it is the group ID followed by @g.us (e.g., 120363123456789@g.us).
Message The text content of the message to send. Supports emojis and formatting.
Advanced Options Additional optional settings:
- Mentions Comma-separated list of phone numbers (without @) to mention in the message.
- Reply To Message ID The ID of an existing message to which this message should be a reply.
- Is Forwarded Boolean flag indicating if the message is forwarded.

Output

The node outputs JSON data representing the result of the send operation. Typically, this includes details about the sent message such as message ID, status, timestamps, or any metadata returned by the WSAPI WhatsApp API.

If the operation succeeds, the output JSON contains information confirming the message was sent. If there is an error, the output may contain an error message describing what went wrong.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the WSAPI WhatsApp API.
  • The node expects the base URL of the WSAPI service to be configured in the credentials.
  • Network connectivity to the WSAPI endpoint is necessary.

Troubleshooting

  • Invalid "To" format: Ensure the recipient ID follows the required format (phone@s.whatsapp.net for contacts or group@g.us for groups). Missing country codes or incorrect suffixes will cause errors.
  • Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Message content issues: Empty or excessively long messages might be rejected by the API.
  • Reply to invalid message ID: If using the "Reply To Message ID" option, ensure the referenced message ID exists and belongs to the same chat.
  • Network or API downtime: Check network connectivity and WSAPI service status if requests fail unexpectedly.

Common error messages typically indicate invalid parameters, authentication failures, or rate limits. Reviewing the error message details and adjusting inputs accordingly usually resolves these issues.

Links and References

Discussion