Evolution API icon

Evolution API

Complete WhatsApp automation with Evolution API

Overview

The node integrates with the Evolution API to automate WhatsApp messaging, specifically enabling sending various types of media files such as documents. The "Send Document" operation under the "Media" resource allows users to send document files directly to a specified WhatsApp phone number.

This node is beneficial in scenarios where automated document sharing is required, such as sending invoices, contracts, reports, or any PDF/Word documents to clients or team members via WhatsApp. For example, a business could automatically send purchase orders or delivery notes to customers after an order is processed.

Properties

Name Meaning
Phone Number The recipient's WhatsApp phone number including country code (without the "+" sign).
Media URL The URL or base64 encoded data of the document file to be sent.
Caption Optional text caption to accompany the document message.
Additional Fields Optional extra settings:
• Delay (milliseconds before sending)
• Link Preview (enable/disable)
• Quoted Message ID (to reply to a specific message)
• Mentions (comma-separated list of numbers to mention)

Output

The node outputs a JSON object containing the response from the Evolution API after attempting to send the document. This typically includes details about the message status or any errors returned by the API.

If the operation fails and "Continue On Fail" is enabled, the output will contain an error message describing the failure.

No binary data is output by this node for the "Send Document" operation.

Dependencies

  • Requires valid credentials for the Evolution API, including:

    • Base URL of the API
    • API key for authentication
    • Instance name identifying the WhatsApp instance
  • Optionally uses credentials for an auxiliary API ("N8N Tools API") for subscription validation.

  • The node sends HTTP POST requests to the Evolution API endpoints to perform actions.

Troubleshooting

  • Invalid Credentials: If the API key or instance name is incorrect, the node will fail to authenticate. Ensure that the API key and instance name are correctly configured.

  • Subscription Validation Failure: The node validates the subscription via an external API. Errors like 401 or 403 indicate invalid subscription or API key for the validation service.

  • Unknown Operation or Resource: If the operation or resource parameters are misconfigured, the node throws errors indicating unknown operations or resources.

  • Network Issues: Connectivity problems to the Evolution API endpoint can cause request failures.

  • Delay Misconfiguration: Setting a very high delay in additional fields may cause unexpected wait times before sending.

To resolve errors, verify all credentials, ensure correct property values, and check network connectivity.

Links and References

(Note: The above links are placeholders; please refer to your API provider's official documentation.)

Discussion