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 members within an organization. Specifically, the "Delete Team Members" operation allows users to remove one or more users from the team. This can be useful in scenarios such as offboarding employees, cleaning up inactive accounts, or managing user access when roles change.
Practical examples include:
- Removing users who no longer require access to the WhatsApp system.
- Reassigning chats from departing team members to active ones to maintain conversation continuity.
- Forcing deletion of users even if they have access to multiple WhatsApp numbers, ensuring complete removal.
Properties
| Name | Meaning |
|---|---|
| Force Delete | Whether to force delete users even if they have access to one or more WhatsApp numbers. (Boolean: true/false) |
| Users to Delete | List of users to delete. Each user entry includes: - Identifier Type: Choose between User ID or Email to identify the user. - User ID: The 24-character hexadecimal ID of the user (if Identifier Type is ID). - Email: Email address of the user (if Identifier Type is Email). - Action: What to do with chats assigned to this user: β’ Unassign Chats β’ Reassign Chats β’ Resolve Chats - Reassign To User ID: If action is "Reassign Chats", specify the User ID to reassign chats to. - Remove Completely: Whether to remove the user completely from the system even if they have access to other WhatsApp numbers. (Boolean) |
Output
The node outputs a JSON object for each input item processed. The structure of the output JSON depends on the result of the delete operation performed by the SparkBot API. Typically, it will contain confirmation details about the deleted users or error information if the operation failed.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the SparkBot WhatsApp API.
- The node relies 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:
- Attempting to delete users who still have active chat assignments without specifying how to handle those chats may cause errors.
- Providing invalid user identifiers (wrong format or non-existent IDs/emails) will result in failure to delete those users.
- Trying to delete users without sufficient permissions or API key scopes may lead to authorization errors.
Error Messages and Resolutions:
- "User not found": Verify that the user ID or email provided is correct and exists in the system.
- "Cannot delete user with active chats": Use the "Action" property to unassign, reassign, or resolve chats before deleting.
- "Unauthorized" or "Invalid API key": Check that the API key credential is correctly configured and has the required permissions.
- "Force delete required": If users have access to multiple WhatsApp numbers, enable the "Force Delete" option to override restrictions.
Links and References
- SparkBot WhatsApp API Documentation (Assumed URL for reference)
- n8n Documentation on Creating Custom Nodes
- General best practices for Managing Team Members in APIs (Generic link placeholder)