Wapisimo icon

Wapisimo

Consume Wapisimo API

Overview

The Wapisimo node's "Add Webhook" operation allows you to programmatically register a webhook URL for a specific phone ID using the Wapisimo API. This is useful when you want to receive real-time notifications or events (such as incoming messages or status updates) from WhatsApp numbers managed via Wapisimo, directly into your n8n workflows.

Common scenarios:

  • Automating the process of subscribing to webhook events for new phone numbers.
  • Dynamically updating webhook endpoints in response to infrastructure changes.
  • Integrating WhatsApp event streams with other systems (e.g., CRMs, ticketing platforms).

Example:
Automatically add a webhook for every new WhatsApp number onboarded, so that all incoming messages are routed to your n8n workflow for processing.

Properties

Name Type Meaning
Phone ID String The ID of the phone to which the webhook will be added.
Webhook URL String The endpoint URL that will receive webhook events from Wapisimo.

Output

The output is a JSON object containing the response from the Wapisimo API after attempting to add the webhook. The structure depends on the API's response, but typically includes information about the newly created webhook or any error message if the operation failed.

Example output:

{
  "id": "webhook_12345",
  "url": "https://your-webhook-endpoint.com",
  "status": "active"
}

If an error occurs and "Continue On Fail" is enabled, the output will look like:

{
  "error": "Error message describing what went wrong"
}

Dependencies

  • External Service: Requires access to the Wapisimo API.
  • API Key: You must provide a valid Wapisimo API key via n8n credentials (wapiSimoApi).
  • n8n Configuration: Ensure the credential is set up in n8n under the name wapiSimoApi.

Troubleshooting

Common issues:

  • Invalid API Key: If the API key is missing or incorrect, the node will throw an authentication error. Make sure your wapiSimoApi credential is valid.
  • Invalid Phone ID: If the provided Phone ID does not exist or is not associated with your account, the API may return a "not found" or "forbidden" error.
  • Malformed Webhook URL: Ensure the Webhook URL is a valid, publicly accessible HTTPS endpoint; otherwise, the API may reject it.
  • Network Issues: Connectivity problems between n8n and the Wapisimo API can cause timeouts or request failures.

Error handling:

  • If "Continue On Fail" is enabled, errors are returned in the output JSON under the error field.
  • Otherwise, the workflow execution will stop and display the error message.

Links and References

Discussion