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 retrieve information about team members. Specifically, the "Get Team Members" operation allows users to fetch a filtered list of users within a team based on various criteria such as user IDs, status, role, device access, and activity timestamps.
This node is beneficial in scenarios where you need to manage or monitor team members in a WhatsApp-based support or sales environment. For example, you can use it to:
- Retrieve all active agents currently assigned to a team.
- Find users who have not logged in recently to identify inactive accounts.
- Search for specific users by name or email.
- Filter users by their roles (Admin, Supervisor, Agent) for role-based reporting or automation.
Properties
| Name | Meaning |
|---|---|
| Filters | A collection of filters to narrow down the list of team members returned. It includes: |
| - User IDs | Filter users by specific IDs (multiple values allowed). |
| - Status | Filter users by their status. Options: Active, Pending, Suspended. |
| - Role | Filter users by their role within the team. Options: Admin, Supervisor, Agent. |
| - Search | Search users by name or email using a text string. |
| - Device ID | Filter users who have access to a specific WhatsApp number/device. The device options are dynamically loaded. |
| - Exclude User IDs | Exclude specific user IDs from the results (multiple values allowed). |
| - Last Online Before | Filter users last seen online before a specified date/time. |
| - Last Online After | Filter users last seen online after a specified date/time. |
| - Last Login Before | Filter users who logged in before a specified date/time. |
| - Last Login After | Filter users who logged in after a specified date/time. |
| - Results Page Size | Number of results to return per page (default 20). |
| - Page Number | Page number to retrieve, starting from 0 (default 0). |
Output
The output is an array of JSON objects representing the team members that match the specified filters. Each object contains details about a user, such as their ID, name, email, status, role, last online time, last login time, and device access information.
If the node supports binary data output (not indicated explicitly here), it would typically relate to user profile images or attachments, but this is not evident from the provided code.
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.
- Dynamic loading of device options suggests integration with the API to fetch available WhatsApp devices/numbers.
Troubleshooting
Common Issues:
- Incorrect or missing API key credential will cause authentication failures.
- Using invalid filter values (e.g., non-existent user IDs or device IDs) may result in empty responses.
- Pagination parameters (page number and size) must be valid integers; otherwise, the API might reject the request.
Error Messages:
- Errors returned from the API will be caught and can be output as error messages if "Continue On Fail" is enabled.
- Typical errors include authentication errors, invalid parameter errors, or network connectivity issues.
Resolution Tips:
- Verify that the API key credential is correctly configured.
- Double-check filter values for correctness.
- Use smaller page sizes if large requests time out.
- Enable "Continue On Fail" during testing to capture error details without stopping workflow execution.
Links and References
- SparkBot WhatsApp API Documentation (Assumed URL, replace with actual if known)
- n8n Documentation on Creating Custom Nodes
- General info on WhatsApp Business API