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 manage team-related operations, specifically allowing you to revoke a user's access to a device (WhatsApp number) within your team. It is useful in scenarios where you need to remove or restrict a team member's ability to use a particular WhatsApp number managed by your organization.
Practical examples include:
- Revoking access for a user who has left the team or changed roles.
- Managing chat assignments when a user is removed, such as reassigning their chats to another team member.
- Cleaning up user access completely from the system if they no longer require any permissions.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) from which to revoke user access. |
| User Identifier Type | Type of identifier used to specify the user: either "User ID" or "Email". |
| User ID | The unique ID of the user to revoke access from (24 characters hexadecimal). Required if identifier type is "User ID". |
| The email address of the user to revoke access from. Required if identifier type is "Email". | |
| Action | What to do with the chats assigned to this user: "Unassign Chats", "Reassign Chats", or "Resolve Chats". |
| Reassign To User ID | If action is "Reassign Chats", specifies the user ID to whom the chats should be reassigned. |
| Remove Completely | Boolean flag indicating whether to remove the user entirely from the system after revoking access. |
Output
The node outputs JSON data representing the result of the revoke device access operation. This typically includes confirmation of the action taken and any relevant details about the user or device affected.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the SparkBot WhatsApp API.
- The node depends on the SparkBot API endpoints related to team management.
- Proper configuration of the API key credential in n8n is necessary for successful execution.
Troubleshooting
Common Issues:
- Providing an invalid or non-existent user ID or email will cause the operation to fail.
- Attempting to reassign chats without specifying a valid target user ID will result in errors.
- Insufficient permissions or incorrect API key credentials can lead to authentication failures.
Error Messages:
- Errors related to "user not found" indicate that the specified user identifier does not exist.
- "Invalid device ID" suggests the WhatsApp number provided is incorrect or not accessible.
- Authentication errors imply issues with the API key or its configuration.
Resolutions:
- Verify the correctness of user identifiers and device IDs before running the node.
- Ensure the API key credential is valid and has the required permissions.
- When reassigning chats, confirm the target user exists and is eligible to receive chat assignments.
Links and References
- SparkBot WhatsApp API Documentation (general reference for API capabilities)
- n8n documentation on Creating Custom Nodes