Evolution API icon

Evolution API

Complete WhatsApp automation with Evolution API

Overview

This node enables sending media files via WhatsApp using the Evolution API. Specifically, the "Send Image" operation allows users to send an image file to a specified phone number on WhatsApp. This is useful for automating communication workflows where images need to be shared, such as customer support, marketing campaigns, or notifications with visual content.

For example, a business could automatically send product images to customers after they place an order, or a support team could share screenshots or diagrams in response to user queries.

Properties

Name Meaning
Phone Number The recipient's phone number including country code, without the "+" sign (e.g., 5511999999999).
Media URL The URL or base64-encoded data of the image file to send.
Caption Optional text caption to accompany the image.
Additional Fields Optional extra settings:
- Delay: Time in milliseconds to wait before sending the message.
- Link Preview: Enable or disable link preview in messages.
- Quoted Message ID: ID of a message to reply/quote.
- Mentions: Comma-separated list of phone numbers to mention in the message.

Output

The node outputs JSON data representing the response from the Evolution API after attempting to send the image. This typically includes details about the sent message status and any metadata returned by the API.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "messageId": "string",
  "status": "sent",
  "timestamp": "2024-06-01T12:00:00Z",
  "recipient": "5511999999999"
}

Dependencies

  • Requires an active Evolution API credential configured in n8n, which includes:

    • Base URL of the Evolution API.
    • API key for authentication.
    • Instance name identifying the WhatsApp instance.
  • Optionally uses a secondary API validation service requiring its own API URL and key.

  • The node makes HTTP POST requests to the Evolution API endpoints.

Troubleshooting

  • Invalid Credentials: If the API key or subscription is invalid, the node will throw an error indicating invalid subscription or API key. Verify that the credentials are correctly set up and active.

  • Unknown Operation or Resource: Errors like "Unknown resource" or "Unknown operation" indicate misconfiguration of the node parameters. Ensure the Resource is set to "Media" and Operation to "Send Image".

  • Network Issues: Failures in HTTP requests may occur due to network problems or incorrect API URLs. Check connectivity and endpoint correctness.

  • Message Sending Delays: If using the delay option, ensure the delay value is reasonable; excessive delays might cause unexpected behavior.

  • Quoted Message ID or Mentions Format: Incorrect formatting of quoted message IDs or mentions (should be comma-separated phone numbers) can cause errors.

Links and References

Discussion