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 integrates with the SparkBot WhatsApp API to manage team members associated with WhatsApp numbers (devices). Specifically, the Create Team Member operation allows you to add a new user to a WhatsApp number's team. This is useful for organizations that want to manage multiple agents or roles (such as Admin, Supervisor, Agent) who can access and operate on a shared WhatsApp business account.
Typical use cases include:
- Adding new customer support agents to a WhatsApp business number.
- Assigning roles and permissions to team members managing WhatsApp communications.
- Automating onboarding of team members by creating their accounts programmatically.
For example, a company could automate adding a new agent with a specific role and color coding, and optionally send them an invitation email to join the team.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) to which the new team member will be added. |
| Display Name | The display name for the new user (2-30 characters). |
| The email address of the new user. | |
| Password | The password for the new user (5-50 characters). |
| Role | The role assigned to the new user. Options: Admin, Supervisor, Agent. |
| Color | The color associated with the new user. Options: Blue, Azure, Indigo, Purple, Pink, Red, Orange, Yellow, Lime, Green, Teal, Cyan, Gray, Gray Dark. |
| Send Invitation Email | Whether to send an invitation email to the new user (boolean). |
Output
The node outputs JSON data representing the result of the create team member operation. This typically includes details about the newly created user such as their ID, assigned role, and other metadata returned by the SparkBot API.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the SparkBot WhatsApp API.
- The node depends on the SparkBot service being accessible and properly configured.
- The "WhatsApp Number" property requires loading available devices via a method that fetches WhatsApp numbers linked to the account.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication failures.
- Providing an invalid WhatsApp Number (device ID) will result in errors when trying to assign a user.
- Passwords not meeting length requirements (5-50 characters) may cause validation errors.
- Email format must be valid; otherwise, the API might reject the request.
Error messages:
- Authentication errors: Check that the API key credential is correctly set up.
- Validation errors: Ensure all required fields are provided and meet constraints (e.g., password length, display name length).
- Device not found: Verify the WhatsApp Number exists and is accessible under your account.
Resolution tips:
- Double-check input parameters before execution.
- Use the "Send Invitation Email" option carefully; if emails fail, verify SMTP/email settings on the SparkBot side.
- Enable "Continue On Fail" in n8n to handle errors gracefully during batch operations.
Links and References
- SparkBot WhatsApp API Documentation (example placeholder, replace with actual URL)
- n8n Documentation on Creating Custom Nodes
- Best practices for managing team members in WhatsApp Business API environments.