Wasapi icon

Wasapi

Integration oficial of Wasapi API for n8n

Overview

This node integrates with the Wasapi API to manage WhatsApp contacts, specifically allowing users to toggle a bot's status for a given contact. The "Toggle Bot" operation enables, disables, or permanently disables the bot interaction on a specified WhatsApp contact. This is useful in scenarios where automated messaging or bot-driven interactions need to be controlled on a per-contact basis, such as pausing bot responses during certain periods or permanently opting out specific users.

Practical examples:

  • Enable the bot for a new customer to start automated support.
  • Temporarily disable the bot for a contact who requested no messages for a while.
  • Permanently disable the bot for contacts who opted out of all automated communications.

Properties

Name Meaning
Phone Wasapi Name or ID Select the phone number associated with your Wasapi account from a list or specify its ID via expression.
WhatsApp ID Enter the WhatsApp phone number of the contact (country code included, without the "+" sign).
Action Choose the bot action to perform on the contact: Enable, Disable, or Disable Permanently.

Output

The node outputs JSON data representing the result of the toggle bot action performed on the specified contact. This typically includes confirmation of the action taken and any relevant metadata returned by the Wasapi API. The output does not include binary data.

Dependencies

  • Requires an active Wasapi API integration with a valid API key credential configured in n8n.
  • The node depends on Wasapi's REST API endpoint at https://api-ws.wasapi.io/api/v1.
  • The "Phone Wasapi Name or ID" property dynamically loads available WhatsApp numbers linked to the Wasapi account.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp ID format can cause errors; ensure the number includes country code without "+".
    • Using a phone number or ID not linked to your Wasapi account will fail to toggle the bot.
    • Network or authentication failures with the Wasapi API may prevent execution.
  • Error messages:

    • "Resource 'contact' with operation 'toggleBot' is not supported" indicates a misconfiguration or unsupported operation selection.
    • Authentication errors suggest invalid or missing API credentials.
    • Validation errors on input properties usually relate to incorrect phone number formats or missing required fields.

To resolve these, verify credentials, confirm input formats, and ensure the selected phone number belongs to your Wasapi account.

Links and References

Discussion