Actions50
- Account Actions
- Call Actions
- Chat Actions
- Contact Actions
- Group Actions
- Instance Actions
- Media Actions
- Message Actions
- Session Actions
- User Actions
Overview
The node provides integration with the WSAPI WhatsApp API, enabling various WhatsApp messaging operations. Specifically, for the Edit Message operation under the Message resource, it allows users to update the text content of an existing WhatsApp message. This is useful in scenarios where a sent message contains errors or needs clarification without sending a new message.
Practical examples include:
- Correcting typos or mistakes in a previously sent message.
- Updating information in a message after receiving new details.
- Modifying announcements or instructions sent to groups or contacts.
Note: Only text messages can be edited on WhatsApp via this API.
Properties
| Name | Meaning |
|---|---|
| To | The WhatsApp contact ID or group ID to which the message belongs. For contacts, use the phone number followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net). For groups, use the group ID followed by @g.us (e.g., 120363123456789@g.us). The phone number must include the country code but exclude the plus sign. |
| Message ID | The unique identifier of the WhatsApp message to edit. This ID can be obtained from previous WhatsApp operations or webhook events. |
| New Message | The updated text content that will replace the original message's text. Only text messages are editable. |
Output
The node outputs JSON data representing the result of the edit message operation. Typically, this includes confirmation details such as the status of the edit and possibly the updated message metadata.
If the node supports binary data output (not explicitly shown here), it would represent media or attachments related to messages, but for editing text messages, the output is purely JSON.
Dependencies
- Requires an active connection to the WSAPI WhatsApp API service.
- Needs an API key credential configured in n8n to authenticate requests.
- The base URL for the WSAPI endpoint must be set in the credentials.
- Proper permissions on the WhatsApp account to edit messages.
Troubleshooting
Common Issues:
- Providing an incorrect or malformed "To" field (wrong format or missing country code) will cause failures.
- Using a message ID that does not exist or has expired may result in errors.
- Attempting to edit non-text messages will fail because WhatsApp only supports editing text messages.
- Network or authentication issues with the WSAPI service can prevent successful execution.
Error Messages:
"The resource "message" is not known!"— indicates an invalid resource selection; ensure "Message" is selected."The operation "editMessage" is not implemented yet!"— suggests a misconfiguration or outdated node version.- API errors returned from WSAPI typically include descriptive messages; check the error details for guidance.
Resolutions:
- Verify the "To" field format matches WhatsApp requirements.
- Confirm the message ID is correct and corresponds to a text message.
- Ensure the API key and base URL credentials are valid and have necessary permissions.
- Check network connectivity and WSAPI service status.
Links and References
- WhatsApp Official Documentation on Message Editing
- WSAPI WhatsApp API Documentation (replace with actual WSAPI docs link)
- n8n Documentation on Creating Custom Nodes