Evolution API icon

Evolution API

Interact with Evolution API

Overview

This node, named "Evolution API," allows users to interact with the Evolution API service. Specifically, for the resource Chat and operation Obtener Multimedia En Base64 (Get Media in Base64), it retrieves media content from a chat message and returns it encoded as a Base64 string. This is useful when you want to extract media files (like images or videos) embedded in chat messages and process or store them in a Base64 format within your workflows.

Practical examples include:

  • Downloading an image or video sent in a chat to embed it directly into reports or emails.
  • Converting video media to MP4 format on the fly if needed.
  • Archiving multimedia content from chat conversations in a database or cloud storage.

Properties

Name Meaning
Nombre De La Instancia The name of the instance to connect to. Identifies which Evolution API instance to use.
ID Del Mensaje The unique identifier of the chat message that contains the media to retrieve.
Convertir A MP4 Boolean option indicating whether to convert the retrieved video media to MP4 format.

Output

The node outputs a JSON array where each item contains the media data encoded as a Base64 string. This output can be used downstream in the workflow for further processing, such as saving to a file, sending via email, or uploading to another service.

If the media is a video and the "Convertir A MP4" property is set to true, the output will contain the media converted to MP4 format before encoding.

No binary data output is indicated; all media is returned as Base64-encoded strings within JSON.

Dependencies

  • Requires an active connection to the Evolution API service.
  • Needs an API authentication token or key configured in n8n credentials (referred generically as "an API key credential").
  • Network access to the Evolution API endpoint https://doc.evolution-api.com/api-reference.

Troubleshooting

  • Common issues:

    • Invalid or missing instance name or message ID will cause the node to fail retrieving media.
    • If the media conversion to MP4 fails, ensure the media type is supported and the API service supports conversion.
    • Network or authentication errors may occur if the API key is invalid or expired.
  • Error messages:

    • "Operação não suportada." indicates the requested operation is not implemented for the selected resource.
    • API errors related to authentication or media retrieval will typically propagate from the Evolution API response.
  • Resolutions:

    • Verify that the instance name and message ID are correct.
    • Check API credentials and renew if necessary.
    • Confirm that the media exists in the specified message and is accessible.
    • Disable MP4 conversion if not required or if errors persist.

Links and References

Discussion