Actions55
- Session Actions
- Message Actions
- Chat Actions
- Contact Actions
- Group Actions
- Webhook Actions
- Status Actions
Overview
The "Delete Message" operation in the WAHA API node allows users to delete a specific WhatsApp message within a chat. This is useful for scenarios where you want to programmatically remove messages that were sent by mistake, contain sensitive information, or are no longer relevant. For example, an automated workflow could delete confirmation messages after processing them or remove spam messages detected by a moderation system.
Properties
| Name | Meaning |
|---|---|
| Session Name | The name of the WhatsApp session to use for the operation. Defaults to the configured session. |
| Chat ID | The unique identifier of the WhatsApp chat (either a phone number with @c.us or a group ID). |
| Message ID | The ID of the specific message to delete within the chat. |
| Additional Fields | A collection of optional fields; not specifically used for delete message but available for other operations. |
Output
The output JSON contains the response from the WAHA API after attempting to delete the message. It typically includes status information indicating whether the deletion was successful or if there was an error. The exact structure depends on the API response but generally confirms the action result.
No binary data is output by this operation.
Dependencies
- Requires an active WhatsApp session identified by the "Session Name".
- Requires valid API credentials for the WAHA API service, including a base URL and an API key.
- Also requires credentials for an auxiliary API ("N8N Tools API") for subscription validation.
- The node makes HTTP requests to the WAHA API endpoints to perform the deletion.
Troubleshooting
- Invalid Session: If the session name is incorrect or the session is not active, the deletion will fail. Ensure the session is started and the correct session name is provided.
- Invalid Chat ID or Message ID: Providing an incorrect chat or message ID will cause the API to return an error. Verify these IDs carefully.
- API Key Issues: Errors related to authentication (e.g., 401 or 403) indicate invalid or expired API keys. Check and update your credentials.
- Subscription Validation Failure: If the auxiliary API validation fails, it may be due to an invalid subscription or API key for the N8N Tools API.
- Network or Endpoint Errors: Ensure the WAHA API base URL is reachable and correct.
Links and References
- WAHA API Documentation (Replace with actual URL if available)
- WhatsApp Chat and Message ID Format (General reference)