Green API icon

Green API

Send WhatsApp messages via Green API

Overview

This node integrates with the Green API service to manage WhatsApp messaging and related communication features. Specifically, for the Message - Edit Message operation, it allows users to update the text content of an existing WhatsApp message by specifying the message ID and the new message text.

Common scenarios where this node is beneficial include:

  • Correcting typos or errors in previously sent WhatsApp messages.
  • Updating information in a message after sending it.
  • Automating message updates in workflows that require dynamic content changes.

Practical example:

  • A customer support workflow sends a message to a client but later needs to update the message with additional details or corrections without sending a new message.

Properties

Name Meaning
Message ID The unique identifier of the WhatsApp message you want to edit.
New Message The updated text content that will replace the original message's text.

Output

The node outputs a JSON array containing the response from the Green API after attempting to edit the message. This response typically includes confirmation of the edit operation or error details if the operation failed.

The output structure corresponds directly to the API response and may contain fields such as status, message ID, or error messages depending on the API's reply.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Green API account with valid credentials (an instance ID and an API token).
  • The node uses these credentials to authenticate requests to the Green API endpoints.
  • Network access to https://api.green-api.com is necessary.
  • No additional environment variables are required beyond the configured credentials.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Providing an incorrect or non-existent Message ID will result in errors from the API indicating the message cannot be found.
    • Network connectivity problems can prevent successful API calls.
    • Insufficient permissions or restrictions on the WhatsApp account may block message editing.
  • Error messages and resolutions:

    • Failed to edit message: <error message>: Indicates the API call failed. Check the message ID validity, API credentials, and network connection.
    • Error processing operation editMessage: <error message>: General error during execution; verify all input parameters and credentials.
    • File read errors or malformed inputs do not apply specifically to this operation but may occur in other operations.

To resolve errors:

  • Double-check the Message ID is correct and belongs to the authenticated WhatsApp instance.
  • Ensure the API credentials are correctly set up and have not expired.
  • Verify network connectivity to the Green API endpoint.
  • Review API usage limits or account restrictions.

Links and References

Discussion