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 get the QR code image data for a given WhatsApp instance, then display it in a UI 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 data string.

No binary data output is indicated by the source code; all output is JSON-formatted.

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 to the Evolution API endpoints using these credentials.
  • The node depends on the axios library for HTTP requests (bundled internally).
  • Proper configuration of the Evolution API credentials in n8n is mandatory.

Troubleshooting

  • Common issues:

    • Invalid or missing API key or base URL in credentials will cause authentication failures.
    • Incorrect instance name may result in errors or empty responses.
    • Network connectivity problems can 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 requests (e.g., 401 Unauthorized, 404 Not Found) usually indicate credential or instance misconfiguration.
  • Resolution tips:

    • 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)
  • n8n documentation on creating and managing credentials
  • Axios HTTP client: https://axios-http.com/

Discussion