Evolution API AI Tool icon

Evolution API AI Tool

Use Evolution API for WhatsApp in AI agents

Overview

This node integrates with the Evolution API for WhatsApp, enabling users to interact programmatically with WhatsApp instances. It supports sending text messages, sending media messages, and retrieving QR codes for WhatsApp instances. This node is useful in scenarios such as automating customer support conversations, broadcasting updates with media attachments, or managing WhatsApp session authentications via QR codes.

Practical examples:

  • Automatically send a welcome message to new customers on WhatsApp.
  • Share promotional images or videos with captions to a list of contacts.
  • Retrieve the QR code needed to authenticate or reconnect a WhatsApp instance.

Properties

Name Meaning
Instance The name of the WhatsApp instance to target

Note: Although the provided properties only include "Instance," the node internally supports an "operation" parameter with options like sendMessage, sendMedia, and getQrCode. Additional parameters depend on the chosen operation (e.g., phone number, message text, media type, media URL, caption).

Output

The node outputs JSON data corresponding to the response from the Evolution API for each executed operation. The structure varies by operation:

  • For sending messages (sendMessage), it returns confirmation or status details from the API.
  • For sending media (sendMedia), it returns the API's response about the media message delivery.
  • For retrieving QR codes (getQrCode), it returns data representing the QR code information.

If an error occurs during execution and the node is set to continue on failure, the output will contain an object with an error field describing the issue.

The node does not output binary data.

Dependencies

  • Requires an external Evolution API service for WhatsApp.
  • Needs an API key credential and the base URL of the Evolution API instance configured in the node credentials.
  • Uses HTTP requests via Axios to communicate with the API endpoints.

Troubleshooting

  • Unsupported Operation Error: If an unsupported operation is specified, the node throws an error indicating the operation is not supported. Ensure the operation parameter is one of the supported values (sendMessage, sendMedia, getQrCode).
  • API Authentication Errors: Missing or invalid API key or incorrect API URL can cause authentication failures. Verify that the API key credential and URL are correctly configured.
  • Network Issues: Failures in connecting to the Evolution API endpoint may occur due to network problems or incorrect URLs.
  • Invalid Parameters: Providing invalid phone numbers, media URLs, or other parameters may result in API errors. Validate inputs before execution.
  • When continueOnFail is enabled, errors for individual items are returned in the output JSON under an error property instead of stopping the workflow.

Links and References

Discussion