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 customer support chat.
  • Reacting with a laughing emoji (😂) to humorous messages in group conversations.

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 and any relevant metadata returned by the WSAPI WhatsApp API.

The node does not output binary data.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API via an API key credential configured in n8n.
  • The base URL for the WSAPI must be set in the credentials.
  • Proper permissions on the WhatsApp account to send reactions to messages.

Troubleshooting

  • Invalid "To" format: Ensure the contact or group ID is correctly formatted with the country code and domain suffix (@s.whatsapp.net for contacts, @g.us for groups).
  • Message ID not found: Verify that the message ID exists and was retrieved from a valid previous operation or webhook event.
  • Emoji not accepted: Use a single standard emoji character; complex or unsupported characters may cause errors.
  • API authentication errors: Check that the API key credential is valid and has not expired.
  • Permission issues: The WhatsApp account might not have permission to react to certain messages or in certain groups.

Common error messages:

  • "The resource 'message' is not known!" — indicates a misconfiguration of the resource parameter.
  • "The operation 'sendReaction' is not implemented yet!" — suggests the operation name might be misspelled or unsupported.
  • API response errors related to invalid IDs or unauthorized access should be resolved by verifying inputs and credentials.

Links and References

Discussion