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
The node interacts with the SparkBot WhatsApp API to update chat attributes for a specified WhatsApp number and chat. This operation is useful when you want to programmatically modify chat settings such as pinning or muting a chat within a WhatsApp account managed by SparkBot.
Practical examples include:
- Automatically pinning important customer support chats to keep them easily accessible.
- Muting less critical group chats during off-hours to reduce notifications.
- Managing chat states in bulk based on business logic or user preferences.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) on which the chat exists. |
| Chat ID | The unique identifier of the chat to update (e.g., 447362053576@c.us for a user chat or 44736205357600000000@g.us for a group chat). |
| Attributes | Collection of chat attributes to update: |
- Pinned: Boolean to pin (true) or unpin (false) the chat. |
|
- Muted: Boolean to mute (true) or unmute (false) the chat. |
Output
The node outputs JSON data representing the result of the update operation. This typically includes confirmation of the updated attributes or any relevant metadata returned by the SparkBot API about the chat after modification.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the SparkBot WhatsApp API.
- Needs an API key credential configured in n8n for authenticating requests to SparkBot.
- The node depends on internal methods that handle chat operations via the SparkBot API.
Troubleshooting
- Common issues:
- Invalid or missing WhatsApp number (device) ID can cause failures.
- Incorrect chat ID format may lead to errors or no updates applied.
- Insufficient permissions or expired API keys will prevent successful updates.
- Error messages:
- Errors related to authentication usually indicate problems with the API key credential; verify and update it if necessary.
- "Chat not found" or similar errors suggest the chat ID does not exist or is inaccessible under the given WhatsApp number.
- To resolve, ensure all input properties are correctly set, and the API key has proper access rights.
Links and References
- SparkBot WhatsApp API Documentation (for detailed API capabilities and chat management)
- n8n documentation on creating custom nodes