Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Message → Delete Message
AI-generatedOverview
This node operation deletes a WhatsApp message from a chat using the Green API. It is useful for scenarios where a user wants to remove a previously sent message either from both sender and receiver sides or only from the sender's side. For example, a user might want to delete a mistakenly sent message or remove sensitive information from a chat.
Use Case Examples
- Deleting a message from a group chat to prevent others from seeing it.
- Deleting a message only from the sender's chat view while keeping it visible to others.
Properties
| Name | Meaning |
|---|---|
| Message ID | The unique identifier of the message to delete, required to specify which message to remove. |
| Delete for Sender Only | A boolean flag indicating whether the message should be deleted only from the sender's side (true) or from both sender and receiver sides (false). |
Output
JSON
chatId- The chat ID from which the message was deleted.idMessage- The ID of the deleted message.onlySenderDelete- Indicates if the message was deleted only for the sender.result- Result status of the delete operation from the API response.
Dependencies
- Green API credentials including instance ID and API token for authentication.
Troubleshooting
- Common issues include invalid or missing message ID, incorrect chat ID, or insufficient permissions to delete the message.
- Error messages like 'Failed to delete message' indicate issues with the API request or network connectivity. Verify credentials and parameters.
- Ensure the 'onlySenderDelete' flag is correctly set as a boolean to avoid unexpected behavior.
Links
- Green API Documentation - Official documentation for the Green API used to send and manage WhatsApp messages.