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 to perform various messaging-related operations. Specifically, the "Get QR Code" operation retrieves a QR code associated with a specified WhatsApp instance. This QR code is typically used to link or authenticate the WhatsApp instance with the Evolution API service.

Common scenarios where this node is beneficial include:

  • Automating WhatsApp instance setup by programmatically obtaining the QR code needed for authentication.
  • Integrating WhatsApp messaging capabilities into workflows that require dynamic instance management.
  • Facilitating AI agents or bots that interact with WhatsApp through the Evolution API.

For example, a user can run this node to fetch the QR code image data for a given WhatsApp instance, then display it in a UI or send it to an operator for scanning and linking the instance.

Properties

Name Meaning
Instance The name of the WhatsApp instance to retrieve the QR code from.

Output

The output JSON contains the data returned by the Evolution API's QR code endpoint for the specified instance. This typically includes the QR code information necessary to link or authenticate the WhatsApp instance.

The exact structure depends on the API response but generally includes fields representing the QR code image or its encoded data.

No binary data output is indicated by the source code for this operation.

Dependencies

  • Requires an active Evolution API credential containing:
    • A base URL for the Evolution API.
    • An API key for authentication.
  • The node makes HTTP requests using Axios to the Evolution API endpoints.
  • Proper configuration of the Evolution API credentials within n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing API key or URL in credentials will cause authentication failures.
    • Specifying a non-existent or incorrect WhatsApp instance name will result in errors or empty responses.
    • Network connectivity problems may prevent successful API calls.
  • Error messages:

    • "The operation \"getQrCode\" is not supported!" — indicates an unsupported operation was requested; ensure the operation parameter is set correctly.
    • Errors related to HTTP request failures (e.g., 401 Unauthorized, 404 Not Found) usually indicate credential or instance misconfiguration.
  • Resolutions:

    • Verify that the Evolution API credentials are correctly set up with valid URL and API key.
    • Confirm the instance name matches one registered in the Evolution API system.
    • Check network access and firewall settings to allow outbound requests to the Evolution API.

Links and References

  • Evolution API official documentation (refer to your provider’s docs for detailed API usage)
  • Axios HTTP client: https://axios-http.com/

Discussion