WSAPI Message

Send and manage WhatsApp messages via WSAPI

Overview

This node allows you to star or unstar a specific WhatsApp message using the WSAPI service. Starring a message is useful for marking important messages so they can be easily found later within WhatsApp. This operation is beneficial in scenarios where you want to highlight key messages in chats, such as important instructions, reminders, or flagged content.

For example, you might use this node to automatically star messages containing critical alerts received in a customer support group, making them easier to review and follow up on.

Properties

Name Meaning
Message ID The unique identifier of the WhatsApp message to star or unstar.
Chat ID The WhatsApp ID of the chat where the message is located (e.g., phone number or group ID).
Message Sender ID The WhatsApp ID of the sender of the message to star/unstar.

Output

The output JSON contains the response from the WSAPI service after attempting to star or unstar the specified message. It typically includes confirmation of the action's success or details about any errors encountered.

No binary data is produced by this operation.

Dependencies

  • Requires an API key credential and instance ID configured for the WSAPI service.
  • The node makes HTTP PUT requests to the WSAPI endpoint /messages/{messageId}/star with appropriate authentication headers.
  • Ensure that the WSAPI service is accessible and properly configured with valid credentials in n8n.

Troubleshooting

  • Common issues:

    • Invalid or missing Message ID, Chat ID, or Message Sender ID will cause the request to fail.
    • Incorrect or expired API key or instance ID credentials will result in authentication errors.
    • Network connectivity problems may prevent communication with the WSAPI service.
  • Error messages:

    • Authentication errors usually indicate invalid API credentials; verify and update your API key and instance ID.
    • "Message not found" or similar errors suggest the provided Message ID or Chat ID is incorrect.
    • Permission denied errors may occur if the authenticated user does not have rights to star messages in the specified chat.
  • Resolution tips:

    • Double-check all input IDs for correctness and completeness.
    • Confirm that the WSAPI credentials are valid and have necessary permissions.
    • Test connectivity to the WSAPI endpoint outside n8n to isolate network issues.

Links and References

Discussion