Evolution API icon

Evolution API

Interact with Evolution API

Overview

This node, named "Evolution API," allows interaction with the Evolution API service. Specifically, for the Chat resource and the Ler Mensagens (Read Messages) operation, it enables users to retrieve 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.

Common scenarios where this node is beneficial include:

  • Fetching a particular message from a chat conversation for auditing or processing.
  • Integrating chat message retrieval into automated workflows, such as customer support ticketing or chatbot responses.
  • Monitoring messages sent or received by a specific instance in real-time or batch processes.

Practical example:

  • A user wants to read a message with a known ID from a WhatsApp-like chat instance to analyze its content or trigger further actions based on the message data.

Properties

Name Meaning
Nome Da Instância The name of the chat instance from which to read the message.
Contato The contact number (remote JID) associated with the chat conversation.
ID Da Mensagem The unique identifier of the message to be retrieved.
Mensagem É Minha Boolean flag indicating if the message was sent by the instance itself (true or false).

Output

The node outputs an array of JSON objects representing the retrieved message(s). Each object contains the message data fetched from the Evolution API corresponding to the specified parameters.

If the message includes binary data (e.g., media attachments), the node would typically handle it accordingly, but based on the provided code and properties, the output focuses on JSON message content.

Dependencies

  • Requires an API key credential for authenticating with the Evolution API service.
  • The node uses the base URL https://doc.evolution-api.com/api-reference for API requests.
  • Proper configuration of the API authentication credentials within n8n is necessary.
  • No additional external dependencies are indicated in the provided source.

Troubleshooting

  • Operation Not Supported Error: If you select an unsupported operation or resource combination, the node throws an error stating the operation is not supported. Ensure that the resource is set to "chat-api" and the operation to "read-messages" for this functionality.
  • Missing Required Parameters: All input properties are required; missing any will likely cause the node to fail. Double-check that "Nome Da Instância," "Contato," "ID Da Mensagem," and "Mensagem É Minha" are correctly filled.
  • API Authentication Issues: If the API key or credentials are invalid or missing, the node will fail to connect. Verify your API credentials in n8n settings.
  • Message Not Found: If the message ID does not exist or is incorrect, the API may return an empty result or error. Confirm the message ID and contact number are accurate.

Links and References

Discussion