Evolution API icon

Evolution API

Interact with Evolution API

Overview

The "Deletar Mensagem" operation for the "Chat" resource in this custom n8n node allows users to delete a specific message from a chat using the Evolution API. This is particularly useful for automating moderation tasks, cleaning up sensitive or erroneous messages, or managing group conversations programmatically.

Practical examples:

  • Automatically remove inappropriate messages from a group chat.
  • Delete messages sent by mistake in customer support conversations.
  • Clean up old or irrelevant messages in automated workflows.

Properties

Below are the input properties required for this operation:

Display Name Type Meaning
Nome Da Instância String The name of the instance. Required to identify which Evolution API instance to use.
Contato String The contact number (remoteJid) where the message exists.
ID Da Mensagem String The unique identifier of the message to be deleted.
Mensagem É Minha Boolean Indicates if the message was sent by the instance itself.
Número Do Participante String The participant's number who sent the message. Required if "Mensagem É Minha" is false.

Output

The output will be a JSON object (or array of objects) representing the result of the delete operation. While the exact structure depends on the Evolution API response, you can expect fields such as:

{
  "success": true,
  "message": "Message deleted successfully",
  "messageId": "1234567890@abc"
}

If the operation fails, the output may include error details.

Dependencies

  • External Service: Requires access to the Evolution API.
  • API Key/Credentials: You must configure valid Evolution API credentials in n8n under the credential type evolutionApi.
  • n8n Configuration: Ensure the node is properly configured with the correct base URL and headers (as set in the node).

Troubleshooting

Common Issues:

  • Invalid Credentials: If your API key or credentials are incorrect, the node will fail to authenticate.
  • Missing Required Fields: Omitting any required property (such as "Nome Da Instância", "Contato", or "ID Da Mensagem") will cause the node to throw an error.
  • Unsupported Operation: If the operation or resource is not supported, you may see an error like:
    Operação não suportada.
    A função "delete-message" para o recurso "chat-api" não é suportada!
    
    Ensure you have selected the correct resource and operation.

How to resolve:

  • Double-check all input fields for correctness.
  • Verify that your Evolution API credentials are valid and active.
  • Make sure the message ID and contact number exist and are accessible.

Links and References

Discussion