SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Overview

This node interacts with the SparkBot WhatsApp API to update the read/unread status of a specific chat on a given WhatsApp number. It allows users to mark chats as either read or unread programmatically.

Common scenarios where this node is beneficial:

  • Automatically marking chats as read after processing messages in a workflow.
  • Flagging important chats as unread to remind agents or users to follow up.
  • Synchronizing chat read statuses between external systems and WhatsApp.

Practical example:

A customer support automation workflow could use this node to mark a chat as read once a ticket is created, ensuring that agents know which conversations have been handled.


Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which the chat belongs. This is selected from available WhatsApp numbers linked to the account.
Chat ID The unique identifier of the chat to update. Examples include 447362053576@c.us for individual users or 44736205357600000000@g.us for groups.
Unread Status Boolean flag indicating whether to mark the chat as unread (true) or read (false).

Output

The node outputs a JSON object representing the result of the update operation. This typically includes confirmation details about the chat whose read status was updated.

No binary data output is involved in this operation.


Dependencies

  • Requires an active connection to the SparkBot WhatsApp API via an API key credential.
  • The node depends on the availability of WhatsApp numbers (devices) configured in the SparkBot system.
  • Proper permissions to modify chat statuses on the specified WhatsApp number are necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp number/device ID may cause failures.
    • Incorrect or malformed Chat ID can lead to errors or no effect.
    • Insufficient permissions or expired API keys will prevent successful updates.
  • Error messages and resolutions:

    • "Chat not found" β€” Verify the Chat ID is correct and exists on the specified WhatsApp number.
    • "Unauthorized" or "Authentication failed" β€” Check that the API key credential is valid and has required permissions.
    • "Invalid device" β€” Ensure the WhatsApp number selected is properly registered and active in the SparkBot system.

Links and References

Discussion