Evolution API icon

Evolution API

Interact with Evolution API

Overview

This node, named "Evolution API," allows users to interact with the Evolution API specifically for managing webhooks related to events. It supports two main operations under the "Evento" resource: setting a new webhook and verifying an existing webhook.

Typical use cases include:

  • Automatically configuring webhooks to receive event notifications from the Evolution API.
  • Checking the status or details of already configured webhooks.
  • Customizing webhook behavior such as enabling/disabling it, choosing which events trigger the webhook, and deciding how media data is sent.

For example, a user might set up a webhook URL to receive real-time updates about chat messages or group participant changes, enabling automated workflows in n8n based on those events.

Properties

Name Meaning
Nome Da Instancia The name of the instance that will send the message.
O Que Deseja Fazer Choose between defining a new webhook ("Definir Webhook") or verifying an existing webhook ("Verificar Webhook").
Ativar Webhook Enable or disable the integration with the webhook (boolean).
Url Do Webhook The URL that will receive the webhook events.
Webhook Por Eventos Whether to create a separate route for each event by appending the event name to the URL (boolean).
Base64 No Webhook Whether to send media data in base64 format within the webhook payload (boolean).
Eventos Select one or more event types that will trigger the webhook. Available options include CALL, CHATS_DELETE, CHATS_SET, CHATS_UPDATE, CHATS_UPSERT, CONNECTION_UPDATE, CONTACTS_SET, CONTACTS_UPDATE, CONTACTS_UPSERT, GROUP_PARTICIPANTS_UPDATE, GROUP_UPDATE, GROUPS_UPSERT, LABELS_ASSOCIATION, LABELS_EDIT, MESSAGES_DELETE, MESSAGES_SET, MESSAGES_UPDATE, MESSAGES_UPSERT, PRESENCE_UPDATE, QRCODE_UPDATED, SEND_MESSAGE, TYPEBOT_CHANGE_STATUS, TYPEBOT_START.

Output

The node outputs JSON data representing the result of the webhook operation performed:

  • For setWebhook, the output typically contains confirmation details about the webhook registration, including status and any relevant metadata.
  • For findWebhook, the output provides information about the current webhook configuration or its existence.

If the webhook involves media data, the node can handle sending media in base64 format if enabled, but binary data output is not explicitly indicated in the provided code.

Dependencies

  • Requires an API key credential for authenticating with the Evolution API.
  • The node expects the Evolution API endpoint to be accessible and properly configured.
  • No additional external dependencies are indicated beyond standard HTTP requests with JSON content type.

Troubleshooting

  • Common issues:

    • Incorrect or missing instance name may cause the API call to fail.
    • Invalid webhook URL or network issues could prevent successful webhook registration.
    • Selecting no events when setting a webhook might result in no triggers firing.
    • Disabling the webhook while expecting events will stop event delivery.
  • Error messages:

    • "Operação não suportada." indicates that the selected operation is not supported for the chosen resource. Verify that the resource and operation names are correct.
    • Network or authentication errors may occur if the API key is invalid or the Evolution API service is unreachable.
  • Resolutions:

    • Double-check all input parameters, especially required fields like instance name and webhook URL.
    • Ensure the API key credential is valid and has necessary permissions.
    • Confirm that the Evolution API service is operational and reachable from your environment.

Links and References

Discussion