WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to perform various messaging operations. Specifically, the "Delete Message" operation under the "Message" resource allows users to delete a specific WhatsApp message by providing its unique message ID and the target contact or group ID.

Common scenarios for this node include:

  • Automatically removing sent messages based on certain conditions (e.g., message content or timing).
  • Managing message history in WhatsApp groups or individual chats.
  • Cleaning up messages after processing them in workflows.

Practical example:

  • After sending a notification message to a WhatsApp contact, you might want to delete it after a certain time or if an error occurs downstream in your workflow.

Properties

Name Meaning
To The WhatsApp contact ID or group ID where the message exists. 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 delete. This ID can be obtained from previous WhatsApp operations or webhook events. Example: BAE5F2C9A4B1E3D2F7G8H9I0.

Output

The output is a JSON object representing the result of the delete operation. Typically, this will confirm whether the deletion was successful or provide details about the deleted message.

If the node supports binary data output (not explicitly shown here), it would represent any media or attachments related to the message, but for the delete operation, the output is primarily JSON confirming the action.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API via an API key credential.
  • The node expects the base URL of the WSAPI service configured in the credentials.
  • No additional external dependencies are indicated beyond the WSAPI service.

Troubleshooting

  • Common issues:

    • Providing an incorrect or malformed "To" field (e.g., missing country code or wrong suffix) may cause the operation to fail.
    • Using an invalid or expired message ID will prevent the message from being found and deleted.
    • Network or authentication errors if the API key or base URL is misconfigured.
  • Error messages:

    • "The resource "message" is not known!" — indicates an invalid resource selection; ensure "Message" is selected.
    • "The operation "deleteMessage" is not implemented yet!" — unlikely here since deleteMessage is implemented, but could appear if operation name is mistyped.
    • API errors returned from WSAPI (e.g., unauthorized, not found) should be checked in the node's execution logs and resolved by verifying credentials and input parameters.

Links and References


Note: This summary is based solely on static analysis of the provided source code and property definitions without runtime inspection.

Discussion