Actions148
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
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
- SparkBot WhatsApp API Documentation (example placeholder link)
- n8n Documentation on Creating Custom Nodes
- WhatsApp Business API official docs for understanding chat identifiers and statuses: https://developers.facebook.com/docs/whatsapp/api/messages