Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node named "Evolution API" is designed to interact with the Evolution API service. Specifically, for the Resource "Chat" and Operation "Read Messages," it allows users to retrieve a specific message from a chat conversation by providing details such as the contact number, message ID, and whether the message was sent by the instance itself.

This node is beneficial in scenarios where you want to programmatically access individual chat messages for processing, auditing, or integration purposes. For example, you might use it to fetch a particular message to analyze its content, forward it, or trigger other workflows based on the message data.

Properties

Name Meaning
Instance Name The name of the Evolution API instance to connect to.
Contact The contact number (remote JID) from which the message originated or to which it belongs.
Message ID The unique identifier of the message to be read.
Message Is Mine Boolean flag indicating if the message was sent by the instance itself (true or false).

Output

The output of the node is a JSON array containing the retrieved message data. Each item in the array corresponds to one message object fetched from the Evolution API. The structure of the JSON will include all relevant fields of the message as returned by the API, such as message content, sender info, timestamps, and metadata.

If the node supports binary data output (not explicitly shown in the provided code), it would typically represent media attachments or files associated with the message.

Dependencies

  • Requires an active connection to the Evolution API service.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • The base URL for API requests is set to https://doc.evolution-api.com/api-reference.
  • No additional external dependencies are indicated in the source code.

Troubleshooting

  • Unsupported operation error: If you select a resource-operation combination not implemented, the node throws an error stating the function is unsupported. Ensure that "Chat" and "Read Messages" are correctly selected.
  • Missing required parameters: The node requires Instance Name, Contact, Message ID, and Message Is Mine properties. Omitting any will likely cause errors or failed API calls.
  • API connectivity issues: Network problems or invalid API credentials can cause failures. Verify your API key and network access.
  • Invalid message ID or contact: Providing incorrect identifiers may result in empty responses or errors from the API.

Links and References

Discussion