SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

The "Update Message" operation under the "Outbound Messages" resource allows users to modify existing outbound WhatsApp messages managed via the SparkBot API. This node is useful when you need to change message content, update delivery details, or adjust metadata after a message has been created but before it is sent or processed.

Common scenarios include:

  • Correcting or updating the text of a scheduled message.
  • Changing the target recipient phone number, group, channel, or chat.
  • Rescheduling the delivery time of a message.
  • Adjusting message priority or assigning it to a different agent or device.
  • Removing specific fields such as media or location data from the message.
  • Adding custom labels for categorization or tracking purposes.

Practical example: Suppose you scheduled a promotional WhatsApp message to a customer group but realized the message text contains a typo. Using this node, you can update the message text and reschedule the delivery without creating a new message.

Properties

Name Meaning
Message ID The unique identifier of the message to update.
Update Fields A collection of fields to modify in the message. These include:
- Message Text New text content for the message.
- Phone Number New target phone number in E.164 format (e.g., +447362053576).
- Group ID New target WhatsApp group ID to send the message to.
- Channel ID New target WhatsApp channel ID for message delivery.
- Chat ID New target WhatsApp chat ID for message delivery.
- Device ID New WhatsApp device ID to use for sending the message.
- Agent ID New agent ID to send the message on behalf of.
- Scheduled Delivery New scheduled date/time for message delivery.
- Priority New message priority level. Options: Low, Normal, High, Urgent. Default is Normal.
- Reference New reference string for tracking the message.
- Remove Fields List of fields to remove from the message. Options include: Reference, Media, Media File, Media Message, Media Reference, Location, Location Address, Location Coordinates.
- Label Custom label to categorize the message.

Output

The node outputs JSON data representing the updated message object returned by the SparkBot API. This typically includes all current properties of the message after the update, such as its ID, content, target information, scheduling, priority, references, and any other metadata.

If the message includes binary data (e.g., media files), those are handled separately and not directly output here.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on the SparkBot service being accessible and properly configured.
  • Some fields (like Group ID, Device ID, Agent ID, Label) rely on dynamic loading methods that fetch available options from the API, so proper permissions and connectivity are necessary.

Troubleshooting

  • Invalid Message ID: If the provided Message ID does not exist or is malformed, the API will return an error. Verify the ID before updating.
  • Invalid Field Values: Providing incorrect formats (e.g., phone number not in E.164 format) or invalid IDs for groups, channels, devices, or agents may cause failures.
  • Permission Issues: Lack of permission to update certain fields or send on behalf of an agent/device can result in authorization errors.
  • Removing Non-existent Fields: Attempting to remove fields that are not present in the message might be ignored or cause warnings.
  • Network/Authentication Errors: Ensure the API key is valid and network connectivity to the SparkBot API is stable.

To resolve errors, check the error message returned by the node output, verify input parameters, and confirm API credentials and permissions.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion