Evolution API

Interagir com a Evolution API v2

Overview

The node integrates with the Evolution API v2 to perform various operations related to WhatsApp messaging and instance management. Specifically, for the Chat resource with the Procurar Mensagens (Find Messages) operation, it allows users to search for messages within a WhatsApp chat instance.

This node is beneficial in scenarios where you need to programmatically retrieve or search messages from WhatsApp chats, such as for customer support automation, message auditing, or data analysis workflows.

For example, you could use this node to:

  • Search for specific keywords or message types in a chat.
  • Retrieve historical messages from a WhatsApp instance for reporting.
  • Automate responses based on message content found in previous conversations.

Properties

Name Meaning
Instance Name The name of the WhatsApp instance to operate on. This identifies which instance the search will be performed in.

Note: The provided input properties JSON only includes "Instance Name" as an input property relevant to this resource-operation combination.

Output

The output is a JSON array containing the results of the message search. Each item in the array represents a message or a related data object returned by the Evolution API.

The output structure includes:

  • The raw data returned by the API for each found message.
  • A success boolean indicating if the operation was successful.
  • A timestamp marking when the operation was executed.
  • A count field indicating the number of messages found (if multiple).

If the API returns strings, the node attempts to parse them as JSON; otherwise, it wraps them in objects.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating requests to the Evolution API v2.
  • The node uses HTTP requests to the Evolution API endpoints.
  • Proper configuration of the API authentication credential in n8n is necessary.
  • The "Instance Name" must correspond to a valid and connected WhatsApp instance managed by the Evolution API.

Troubleshooting

  • Common Issues:

    • Invalid or missing instance name: Ensure the "Instance Name" matches an existing instance.
    • Authentication errors: Verify that the API key credential is correctly configured and has permissions.
    • Network or API endpoint issues: Check connectivity and API availability.
  • Error Messages:

    • Errors thrown by the API are caught and can be returned as error messages in the output if "Continue On Fail" is enabled.
    • Parsing errors may occur if the API returns unexpected string formats; these are handled gracefully but may affect output structure.
  • Resolution Tips:

    • Double-check all input parameters for correctness.
    • Confirm the instance is active and connected.
    • Review API credentials and permissions.
    • Enable detailed logging or error output in n8n for debugging.

Links and References


This summary focuses on the Chat resource's "Procurar Mensagens" operation as requested, based solely on static code analysis of the provided source.

Discussion