Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" allows users to interact with the Evolution API, specifically focusing on managing webhooks related to events. It supports two main operations under the "Event" resource: setting a new webhook and verifying an existing webhook. This node is useful for automating event-driven workflows where external systems need to be notified about specific occurrences (e.g., message updates, group changes, presence updates) via webhooks.

Practical examples include:

  • Automatically registering a webhook URL to receive real-time notifications about chat or message events.
  • Checking if a webhook is already set up for a given instance before attempting to create a new one.
  • Enabling or disabling webhook integration dynamically based on workflow conditions.

Properties

Name Meaning
Instance Name The name of the instance that will send the webhook messages.
What Do You Want to Do Choose between defining a new webhook ("Definir Webhook") or verifying an existing webhook ("Verificar Webhook").
Ativar Webhook Enable or disable the webhook integration (only applicable when setting a webhook).
Url Do Webhook The URL that will receive the webhook event notifications.
Webhook Por Eventos Whether to create a separate route for each event by appending the event name to the webhook URL.
Base64 No Webhook Whether media data should be sent in base64 format within the webhook payload.
Eventos Select one or more event types to subscribe to for webhook notifications. 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 a JSON array containing the response from the Evolution API after performing the selected operation. The structure of the JSON depends on whether the user chose to set or verify a webhook but generally includes details about the webhook status, configuration, or confirmation of the action performed.

If the webhook involves media data, the node can handle sending media in base64 format as specified by the input property, but binary data output is not explicitly indicated.

Dependencies

  • Requires an API key credential for authenticating with the Evolution API.
  • The node expects the Evolution API base URL https://doc.evolution-api.com/api-reference and uses JSON content-type headers.
  • Proper configuration of the instance name and webhook URLs is necessary for successful operation.

Troubleshooting

  • Common issues:

    • Invalid or missing instance name may cause the API call to fail.
    • Incorrect webhook URL format or unreachable URLs will prevent webhook registration.
    • Selecting no events when setting a webhook might result in no notifications being received.
    • Disabling the webhook while expecting events will stop notifications.
  • Error messages:

    • "Operação não suportada." indicates that the chosen operation is not implemented for the selected resource.
    • API errors returned from the Evolution API (e.g., authentication failures, invalid parameters) should be checked in the node's error output.
  • Resolutions:

    • Verify all required fields are filled correctly.
    • Ensure the webhook URL is publicly accessible.
    • Confirm API credentials are valid and have sufficient permissions.
    • Check network connectivity and firewall settings that might block webhook calls.

Links and References

Discussion