SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node integrates with the SparkBot WhatsApp API to perform various operations related to WhatsApp messaging and management. Specifically, for the Chat Messages resource with the Edit Message operation, it allows users to modify the text content of an existing WhatsApp message by specifying the WhatsApp number, the message ID, and the new message text.

This functionality is useful in scenarios where a sent message needs correction or updating after delivery, such as fixing typos, updating information, or retracting and replacing content without sending a new message. For example, customer support agents can update a previously sent message to provide corrected details or additional instructions.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which the message was sent.
Message ID The unique hexadecimal ID of the WhatsApp message to be edited.
New Message Text The new text content that will replace the original message's text.

Output

The node outputs JSON data representing the result of the edit message operation. This typically includes confirmation of the updated message details or status returned by the SparkBot API. The exact structure depends on the API response but generally contains fields indicating success or failure and the updated message metadata.

The node does not output binary data.

Dependencies

  • Requires an active connection to the SparkBot WhatsApp API.
  • Needs an API key credential configured in n8n for authenticating requests to the SparkBot service.
  • The node relies on internal methods imported from the chatMessages action module to perform the edit operation.

Troubleshooting

  • Common Issues:

    • Invalid or missing WhatsApp number ID may cause the operation to fail.
    • Incorrect or expired message ID will prevent the message from being found and edited.
    • Insufficient permissions or invalid API key can lead to authentication errors.
    • Network connectivity issues might cause request timeouts or failures.
  • Error Messages:

    • "Message not found": Verify the message ID is correct and belongs to the specified WhatsApp number.
    • "Unauthorized" or "Invalid API key": Check that the API key credential is correctly set up and has necessary permissions.
    • "Failed to update message": Could indicate API-side issues or invalid input; review the new message text and parameters.

To resolve these errors, ensure all input properties are accurate, credentials are valid, and the SparkBot API service is reachable.

Links and References

Discussion