Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node "Evolution API" allows interaction with the Evolution API service. Specifically, for the Resource "Chat" and Operation "Leer Mensajes" (Read Messages), it retrieves a specific message from a chat instance by providing details such as the instance name, contact number, message ID, and whether the message was sent by the instance itself. This node is useful in scenarios where you want to programmatically fetch and process individual chat messages from an external chat system integrated via the Evolution API.

Practical examples include:

  • Fetching a particular message to analyze its content or metadata.
  • Retrieving messages for audit or logging purposes.
  • Integrating chat message data into workflows for further automation or reporting.

Properties

Name Meaning
Nombre De La Instancia The name of the chat instance from which to read the message.
Contacto The contact's phone number or identifier associated with the chat message.
ID Del Mensaje The unique identifier of the message to be retrieved.
El Mensaje Es Mío Boolean flag indicating if the message was sent by the instance itself (true or false).

Output

The node outputs a JSON array containing the retrieved message data. Each item in the output array corresponds to one message object with its properties as returned by the Evolution API. The exact structure depends on the API response but typically includes message content, sender information, timestamps, and other relevant metadata.

If the node supports binary data (not evident from the provided code), it would represent attachments or media within the message, but this is not explicitly shown here.

Dependencies

  • Requires an active connection to the Evolution API service.
  • Needs an API authentication credential configured in n8n (an API key or token).
  • The base URL for requests is set to https://doc.evolution-api.com/api-reference.
  • No additional environment variables are indicated.

Troubleshooting

  • Operation Not Supported Error: If the operation "Leer Mensajes" is not supported for the resource "Chat", the node will throw an error stating the function is not supported. Ensure that the operation and resource names are correctly specified.
  • Missing Required Parameters: All input properties are required; missing any will likely cause the node to fail or return incomplete data.
  • API Authentication Issues: Invalid or missing API credentials will prevent successful communication with the Evolution API.
  • Incorrect Instance or Contact Info: Providing wrong instance names or contact identifiers may result in no data found or errors from the API.

Links and References

Discussion