Evolution API AI Tool icon

Evolution API AI Tool

Use Evolution API to send WhatsApp messages in AI agents

Overview

This node integrates with the Evolution API to send WhatsApp messages through AI agents. It supports sending plain text messages, media messages (images, documents, videos, audio), and retrieving QR codes for WhatsApp instances. This node is useful for automating WhatsApp communications in workflows, such as customer support notifications, marketing campaigns, or sending multimedia content directly via WhatsApp.

For the Send Media Message operation specifically, the node sends a media file (image, document, video, or audio) to a specified phone number on WhatsApp, optionally including a caption.

Practical Example

  • Sending a promotional image with a caption to a customer.
  • Delivering a PDF invoice document automatically after a purchase.
  • Sharing a short video tutorial or audio message to users.

Properties

Name Meaning
Instance The name of the WhatsApp instance to use for sending the message.
Phone Number Recipient's phone number including country code (e.g., 5511999999999).
Media Type Type of media to send. Options: Image, Document, Video, Audio.
Media URL URL pointing to the media file to be sent.
Caption Optional text caption to accompany the media message.

Output

The node outputs an array of JSON objects, each representing the result of sending a message. Each object contains:

  • success: Boolean indicating if the message was sent successfully.
  • result: The raw response data from the Evolution API.
  • message: A human-readable confirmation string, e.g., "Media message sent successfully to [phone number]".

No binary data output is produced by this node.

Dependencies

  • Requires an active Evolution API account with valid API credentials (API key and base URL).
  • The node expects these credentials to be configured in n8n before execution.
  • Internet access is required to reach the Evolution API endpoints.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect phone number format may lead to message delivery errors.
    • Unsupported media URLs or inaccessible media files can cause the media message to fail.
    • Using an unsupported operation name will throw an error.
  • Error messages:

    • "The operation \"[operation]\" is not supported!" indicates an invalid operation parameter.
    • Network or API errors will be returned in the error field when continueOnFail is enabled.
  • Resolutions:

    • Verify API credentials and ensure they are correctly set up in n8n.
    • Confirm phone numbers include the correct country code without extra characters.
    • Ensure media URLs are publicly accessible and point directly to the media file.
    • Use only supported operations: sendMessage, sendMedia, or getQrCode.

Links and References

Discussion