Evolution API icon

Evolution API

Complete WhatsApp automation with Evolution API

Overview

This node integrates with the Evolution API to automate WhatsApp messaging tasks. Specifically, the "Delete Message" operation under the "Message" resource allows users to delete a specific WhatsApp message programmatically. This is useful in scenarios where messages need to be retracted or removed after sending, such as correcting mistakes, managing sensitive information, or automating chat cleanups.

Practical examples include:

  • Automatically deleting a sent message if certain conditions are met (e.g., wrong recipient).
  • Cleaning up old messages in a chat after a workflow completes.
  • Managing message lifecycle in customer support automation.

Properties

Name Meaning
Additional Fields Optional extra parameters:
- Delay: Delay in milliseconds before sending.
- Link Preview: Enable or disable link preview in messages.
- Quoted Message ID: ID of a message to quote or reply to.
- Mentions: Comma-separated list of phone numbers to mention in the message.

Note: For the "Delete Message" operation, the relevant additional field is likely the messageId inside additionalFields (though not explicitly listed in your provided properties, it appears in the code as p.messageId).

Output

The node outputs JSON data representing the response from the Evolution API after attempting to delete the message. The structure typically contains confirmation of deletion or error details if the operation failed.

Example output JSON might look like:

{
  "success": true,
  "message": "Message deleted successfully",
  "deletedMessageId": "1234567890"
}

If an error occurs, the output will contain an error message describing the failure.

The node does not output binary data for this operation.

Dependencies

  • Requires an API key credential for the Evolution API to authenticate requests.
  • Optionally uses another API key credential for a validation service ("N8N Tools API") to verify subscription and API key validity before making calls.
  • The node expects configuration of instance name and base URL for the Evolution API.
  • Network access to the Evolution API endpoints is required.

Troubleshooting

  • Invalid Subscription or API Key: If the node throws errors related to invalid subscription or API key, verify that the API keys configured in credentials are correct and active.
  • Unknown Operation or Resource Errors: These occur if the operation or resource parameter is incorrect or unsupported. Ensure "Resource" is set to "Message" and "Operation" to "Delete Message".
  • Missing Message ID: Deleting a message requires specifying the message ID in the additional fields. Omitting this may cause the API call to fail.
  • Network Issues: Connectivity problems to the Evolution API endpoint will cause request failures.
  • API Rate Limits: Excessive requests may be throttled by the API; handle such errors gracefully.

Links and References

  • Evolution API Documentation (hypothetical link)
  • WhatsApp Business API concepts for message management
  • n8n documentation on creating custom nodes and using HTTP Request helpers

Discussion