Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" provides an interface to interact with the Evolution API service. Specifically, for the Resource "Chat" and Operation "Get Media in Base64," it retrieves media content associated with a chat message and returns it encoded in Base64 format. This operation is useful when you need to fetch media files (such as images or videos) from chat messages for further processing, storage, or display within workflows.

A practical example includes automating the download of media attachments from chat conversations for archival or analysis purposes. Additionally, the option to convert video media to MP4 format allows standardizing video outputs for compatibility.

Properties

Name Meaning
Name Da Instância The name of the instance to connect to the Evolution API.
Message ID The identifier of the chat message that contains the media to retrieve.
Converter Para MP4 Boolean flag indicating whether to convert the retrieved video media into MP4 format.

Output

The node outputs a JSON array where each item corresponds to the result of the media retrieval operation. The key output field json contains the media data encoded as a Base64 string. If the media is a video and the conversion option is enabled, the Base64 string represents the video converted to MP4 format.

If the node supports binary data output (not explicitly shown in the provided code), it would typically represent the raw media file content; however, here the focus is on Base64-encoded media within the JSON output.

Dependencies

  • Requires access to the Evolution API service endpoint.
  • Needs an API authentication token or API key credential configured in n8n to authorize requests to the Evolution API.
  • Network connectivity to the Evolution API base URL (https://doc.evolution-api.com/api-reference).

Troubleshooting

  • Operation Not Supported Error: If the node throws an error stating the operation is not supported, verify that the selected resource and operation names are correct and implemented.
  • Authentication Errors: Ensure that the API key or authentication credentials are correctly set up in n8n and have sufficient permissions.
  • Invalid Message ID: Providing an incorrect or non-existent message ID will likely result in errors or empty responses. Double-check the message ID input.
  • Conversion Failures: If video conversion to MP4 fails, confirm that the media type is indeed a video and that the conversion feature is supported by the API.

Links and References

Discussion