Wappfy icon

Wappfy

Interact with WhatsApp through Wappfy API

Chat → Edit Message

AI-generated

Overview

The node enables editing a specific message within a WhatsApp chat using the Wappfy API. It allows users to update the text content of an existing message identified by its message ID in a particular chat. This operation is useful for correcting typos, updating information, or modifying messages after they have been sent.

Practical examples:

  • Correcting a typo in a previously sent message.
  • Updating a message with new information without sending a new message.
  • Modifying automated notification messages dynamically.

Properties

Name Meaning
Chat ID The unique identifier of the chat where the message exists (e.g., 123456789@c.us).
Message ID The unique identifier of the message to be edited within the specified chat.
New Text The new text content that will replace the current message text.

Output

The node outputs the JSON response returned by the Wappfy API after editing the message. This typically includes details about the updated message or confirmation of the successful edit. The output is structured as a JSON object under the json field.

If the API returns an array of results, each item is output separately as individual JSON objects.

No binary data output is involved in this operation.

Dependencies

  • Requires an active Wappfy API credential with:

    • Base URL of the Wappfy API instance.
    • Instance name identifying the WhatsApp session.
    • An API key for authentication.
  • The node makes an HTTP PUT request to the endpoint:

    {baseUrl}/api/{instanceName}/chats/{chatId}/messages/{messageId}
    

    with a JSON body containing the new text.

Troubleshooting

  • Common issues:

    • Invalid or missing Chat ID or Message ID will cause the API to fail to locate the message.
    • Insufficient permissions or invalid API key may result in authorization errors.
    • Network connectivity problems can prevent the request from reaching the API.
  • Error messages and resolutions:

    • "Message not found": Verify that the Chat ID and Message ID are correct and correspond to an existing message.
    • "Unauthorized" or "Invalid API key": Check that the API key credential is correctly configured and valid.
    • "Request failed" or timeout errors: Ensure network access to the Wappfy API endpoint and that the base URL is correct.

Links and References

  • Wappfy API Documentation (Assumed link for reference)
  • n8n documentation on HTTP Request Node for understanding API calls
  • WhatsApp messaging best practices and guidelines on official WhatsApp Business API pages

Discussion