WbizTool Cancel Message

Cancel scheduled WhatsApp messages via WbizTool

Overview

This node allows users to cancel scheduled WhatsApp messages via the WbizTool service. It is useful in scenarios where a previously scheduled message needs to be retracted or prevented from being sent, such as correcting mistakes, updating information, or stopping messages due to changed circumstances.

For example, if you have scheduled a promotional message to be sent later but decide to cancel it before delivery, this node can be used to send a cancellation request to WbizTool using the message's unique ID.

Properties

Name Meaning
Message ID The unique identifier of the scheduled message to cancel. This ID comes from the response when the message was originally scheduled.

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each output object contains:

  • success: Boolean indicating whether the cancellation was successful.
  • status: Numeric status code returned by the WbizTool API (1 indicates success).
  • message: A descriptive message from the API about the cancellation result.
  • response: The full raw response from the WbizTool API.
  • input: The input parameters used for the cancellation (specifically the messageId).
  • cancellation: An object containing:
    • messageId: The ID of the canceled message.
    • canceledAt: ISO timestamp of when the cancellation was performed.
    • statusText: Textual status message from the API.

If the cancellation fails and the node is configured to continue on failure, the output will include:

  • success: false
  • error: Error message describing what went wrong.

No binary data is produced by this node.

Dependencies

  • Requires an active connection to the WbizTool API with valid credentials including a client ID and API key.
  • The node depends on a helper function (wbizToolApiRequest) to make authenticated HTTP POST requests to the /cancel_msg/ endpoint of the WbizTool API.
  • Proper credential configuration within n8n is necessary to authenticate API calls.

Troubleshooting

  • Empty Message ID: If the "Message ID" property is empty or only whitespace, the node throws an error stating "Message ID cannot be empty". Ensure that a valid message ID string is provided.
  • API Errors: If the WbizTool API returns a status other than 1, the node throws an error with the message returned by the API. Check the message ID validity and API credentials.
  • Credential Issues: Failure to provide valid API credentials will prevent the node from authenticating and making requests.
  • Continue On Fail: If enabled, the node will not stop execution on errors but instead output error details per item, allowing workflows to handle failures gracefully.

Links and References

Discussion