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 the issue has been resolved.
  • 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 value 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 that the message was successfully starred or unstarred. The exact structure depends on the WSAPI response but generally confirms the action's success or failure.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API.
  • Needs an API authentication token or API key credential configured in n8n to authorize requests.
  • The base URL for the WSAPI must be set in the credentials configuration.

Troubleshooting

  • Common issues:

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

    • "The resource "message" is not known!": Indicates the resource parameter is incorrect; ensure "Message" is selected.
    • "The operation "starMessage" is not implemented yet!": Suggests the operation name is misspelled or unsupported; verify operation selection.
    • Authentication errors: Check API key validity and permissions.
    • Validation errors on input properties: Confirm the "To" and "Message ID" values are correctly formatted and exist.

Links and References

  • WSAPI WhatsApp API Documentation (example link, replace with actual if available)
  • WhatsApp message ID retrieval methods via WSAPI webhooks or previous node executions
  • n8n documentation on setting up API credentials and using HTTP-based nodes

Discussion