WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node enables sending a reaction emoji to a specific WhatsApp message using the WSAPI WhatsApp API. It is useful in scenarios where you want to programmatically acknowledge or respond to messages with emojis, such as marking important messages, expressing emotions quickly, or automating feedback in group chats.

Practical examples:

  • Automatically reacting with a thumbs-up emoji (👍) to confirm receipt of a message.
  • Sending a heart emoji (❤️) reaction to show appreciation for a message in a group chat.
  • Reacting with a laughing emoji (😂) to humorous messages detected by other automation logic.

Properties

Name Meaning
To The WhatsApp contact ID or group ID to which the reaction will be sent. For contacts, use the phone number followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net). For groups, use the group ID followed by @g.us.
Message ID The unique identifier of the WhatsApp message to which the reaction applies. This ID can be obtained from previous WhatsApp operations or webhook events.
Emoji A single emoji character to use as the reaction. Any standard emoji can be used, such as 👍, ❤️, 😂, 😮, 😢, 🙏.

Output

The node outputs JSON data representing the result of the send reaction operation. This typically includes confirmation details such as the status of the reaction sent, message identifiers, and any metadata returned by the WSAPI WhatsApp API.

The node does not output binary data.

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

  • Common issues:

    • Invalid or missing "To" field format (must include country code without "+" and proper suffix).
    • Incorrect or expired API authentication token leading to authorization errors.
    • Using an invalid or non-existent message ID may cause the reaction to fail.
    • Unsupported or multiple emoji characters in the "Emoji" property could cause errors.
  • Error messages and resolutions:

    • "The resource "message" is not known!": Indicates a misconfiguration of the resource parameter; ensure it is set to "message".
    • "The operation "sendReaction" is not implemented yet!": Suggests the operation name might be misspelled or unsupported; verify the operation name.
    • API errors related to authentication usually require checking the API key credential and its permissions.
    • Validation errors on input properties should be resolved by ensuring correct formats and required fields are provided.

Links and References

Discussion