Evolution API icon

Evolution API

Interact with Evolution API

Overview

This node interacts with the "Evolution API" to perform various operations on different resources. Specifically, for the Chat resource and the Eliminar Mensaje (Delete Message) operation, it allows users to delete a specific chat message from an instance by providing details such as the instance name, contact number, message ID, and information about the message sender.

This node is beneficial in scenarios where automated management of chat messages is required, such as removing outdated or incorrect messages programmatically, moderating conversations, or cleaning up chat histories in bulk.

Practical example:
A customer support automation workflow could use this node to delete messages that contain sensitive information after a certain period or upon request, ensuring compliance with data privacy policies.

Properties

Name Meaning
Nombre De La Instancia The name of the Evolution API instance to connect to.
Contacto The phone number or identifier of the contact whose message is to be deleted.
ID Del Mensaje The unique identifier of the message that will be deleted.
El Mensaje Es Mío Boolean indicating if the message was sent by the instance itself (true) or received (false).
Número Del Participante The phone number of the participant who sent the message; required only if the message is not from the instance.

Output

The node outputs a JSON array containing the result of the delete message operation. Typically, this would include confirmation of deletion or any relevant status information returned by the Evolution API.

If the API supports binary data output (not indicated here), it would represent related media or attachments, but based on the provided code and properties, the output is purely JSON.

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 https://doc.evolution-api.com/api-reference.
  • Proper configuration of the instance name and credentials is necessary for successful communication.

Troubleshooting

  • Common issues:

    • Incorrect or missing instance name can cause connection failures.
    • Providing an invalid or non-existent message ID will result in failure to delete the message.
    • If the "El Mensaje Es Mío" flag is set incorrectly, the API might reject the request due to permission issues.
    • Missing participant number when required (i.e., when the message is not from the instance) may cause errors.
  • Error messages:

    • "Operação não suportada." indicates that the requested operation is not supported for the specified resource. Verify that the resource and operation names are correct.
    • API errors related to authorization typically mean the API key or credentials are invalid or expired.
    • Validation errors usually indicate missing or malformed input parameters.

To resolve these issues, double-check all input parameters, ensure the API credentials are valid, and confirm that the message ID exists and belongs to the specified contact.

Links and References

Discussion