WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node interacts with the WSAPI WhatsApp API to star or unstar a specific WhatsApp message. Starring a message is useful for marking important messages for quick reference later, similar to bookmarking or favoriting. This operation can be applied to individual chat messages in personal or group conversations.

Practical examples:

  • Marking an important customer inquiry message in a support chat for follow-up.
  • Unstarring a message after resolving the issue it referred to.
  • Organizing starred messages to quickly access key information in busy group chats.

Properties

Name Meaning
To The WhatsApp contact ID or group ID where the message resides. 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 star or unstar. This ID can be obtained from previous WhatsApp operations or webhook events.
Starred Boolean flag indicating whether to star (true) or unstar (false) the specified message.

Output

The node outputs JSON data representing the result of the star/unstar operation on the message. Typically, this will include confirmation details such as success status and possibly the updated message metadata reflecting the starred state.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API via an API key credential configured in n8n.
  • The node uses the base URL provided by the credential to send requests.
  • Proper permissions on the WhatsApp account to modify message states are necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing To property format (must include country code and correct suffix).
    • Incorrect or expired Message ID leading to "message not found" errors.
    • Insufficient permissions or invalid API credentials causing authentication failures.
    • Network connectivity problems preventing communication with the WSAPI endpoint.
  • Error messages and resolutions:

    • "The resource "message" is not known!": Indicates a misconfiguration of the resource parameter; ensure "Message" is selected.
    • "The operation "starMessage" is not implemented yet!": Suggests the operation name might be misspelled or unsupported; verify operation selection.
    • Authentication errors: Check that the API key credential is correctly set up and has not expired.
    • Validation errors on input properties: Confirm that To and Message ID are correctly formatted and provided.

Links and References

  • WSAPI WhatsApp API Documentation (generic placeholder link)
  • WhatsApp official documentation on starring messages (if available)
  • n8n documentation on creating and using custom nodes and credentials

Discussion