Evolution API icon

Evolution API

Interact with Evolution API

Overview

The node provides an interface to interact with the "Evolution API," specifically supporting operations on various resources. For the Chat resource and the Delete Message operation, it allows users to delete a specific message from a chat conversation. This is useful in scenarios where you want to programmatically remove messages sent or received by a particular contact or participant, such as moderating chat content, correcting mistakes, or managing chat history.

Practical examples include:

  • Automatically deleting sensitive messages after a certain event.
  • Removing erroneous or duplicate messages from a chat.
  • Moderation bots that clean up inappropriate content.

Properties

Name Meaning
Instance Name The name of the Evolution API instance to use for the request.
Contact The contact number (remote JID) identifying the chat where the message exists.
Message ID The unique identifier of the message to be deleted.
Message Is Mine Boolean indicating if the message was sent by the instance itself (true) or not (false).
Participant Number The 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. The exact structure depends on the Evolution API response but typically includes confirmation of deletion status or error details if the deletion failed.

No binary data output is indicated.

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

Troubleshooting

  • Unsupported operation error: If the node throws an error stating the operation is unsupported, verify that the resource and operation names are correctly set to "chat" and "delete-message" respectively.
  • Missing required parameters: Ensure all required properties (Instance Name, Contact, Message ID, Message Is Mine, and Participant Number when applicable) are provided.
  • Authentication errors: Confirm that the API key or authentication token is valid and has sufficient permissions.
  • Message not found or cannot be deleted: This may occur if the message ID is incorrect, the message does not belong to the specified contact, or if the user lacks permission to delete the message. Double-check the message ID and participant information.
  • Network or API errors: Check network connectivity and API availability. Review API rate limits or quota restrictions.

Links and References

Discussion