Green API icon

Green API

Send WhatsApp messages via Green API

Message → Delete Message

AI-generated

Overview

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

  1. Deleting a message from a group chat to prevent others from seeing it.
  2. 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

Discussion