Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" allows interaction with the Evolution API service, specifically supporting various resources and operations. For the provided Resource "Evento" and Operation "Webhook," the node enables users to either set up a new webhook or verify an existing webhook for receiving event notifications from the Evolution API.

Typical use cases include:

  • Automatically receiving real-time updates about events such as message changes, group updates, or connection status.
  • Integrating Evolution API event streams into workflows by defining webhooks that forward event data to specified URLs.
  • Managing webhook configurations programmatically within n8n to enable or disable event notifications dynamically.

For example, a user can configure the node to set a webhook URL that listens for chat updates and message deletions, enabling automated processing of these events in downstream workflow steps.

Properties

Name Meaning
Nome Da Instancia The name of the instance that will send the messages. This identifies which Evolution API instance is used.
O Que Deseja Fazer Choose between two actions:
- Definir Webhook (Set Webhook)
- Verificar Webhook (Find/Check Webhook)
Ativar Webhook Boolean flag to enable or disable the webhook integration when setting a webhook.
Url Do Webhook The URL that will receive the webhook event notifications.
Webhook Por Eventos Boolean flag indicating whether to create separate routes for each event by appending the event name to the webhook URL.
Base64 No Webhook Boolean flag indicating whether media data should be sent in base64 format within the webhook payload.
Eventos Multi-select list of event types to subscribe to for webhook notifications. 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 a JSON array containing the result of the webhook operation performed:

  • When setting a webhook, the output typically includes confirmation details such as success status, webhook URL, enabled state, and subscribed events.
  • When verifying a webhook, the output contains information about the current webhook configuration or its existence.

The output does not explicitly handle binary data; it focuses on JSON responses related to webhook management.

Dependencies

  • Requires an API key credential for authenticating with the Evolution API.
  • The node uses the base URL https://doc.evolution-api.com/api-reference for API requests.
  • Proper network access to the Evolution API endpoint is necessary.
  • The webhook URL must be publicly accessible to receive event callbacks.

Troubleshooting

  • Common Issues:

    • Invalid or missing instance name may cause failures in identifying the correct Evolution API instance.
    • Incorrect webhook URL or inaccessible URL will prevent event delivery.
    • Selecting no events when setting a webhook might result in no events being received.
    • Enabling webhook without proper permissions or API credentials will cause authorization errors.
  • Error Messages:

    • "Operação não suportada." indicates the selected operation is not supported for the chosen resource. Verify the resource and operation names.
    • Network or authentication errors may occur if API credentials are invalid or expired.
    • Validation errors if required properties like "Nome Da Instancia" or "Url Do Webhook" are empty.
  • Resolutions:

    • Ensure all required fields are filled correctly.
    • Confirm the webhook URL is reachable and accepts POST requests.
    • Check API credentials and permissions.
    • Select appropriate events to subscribe to.

Links and References

Discussion