Overview
This node, named "Wuzapi Admin," provides administrative operations for managing users in the Wuzapi WhatsApp API system. It allows you to create new users, delete existing users (either partially or fully), and list all users. This node is useful for automating user management tasks such as onboarding new users with specific configurations, cleaning up users from the database, or retrieving user lists for reporting or synchronization purposes.
A practical example would be:
- Automatically creating a new user with custom webhook and proxy settings when a new employee joins.
- Deleting a user by their ID when they leave the organization.
- Listing all users to audit active accounts.
Properties
| Name | Meaning |
|---|---|
| Operation | The action to perform. Options: Create User, Delete User, Delete User Full, List Users. |
| User Name | Name of the user to create. Required when creating a user. |
| User Token | Authentication token for the user. Required when creating a user. |
| Additional Options | Extra settings for user creation including: Webhook URL, Events subscription, Proxy Configuration, and S3 storage settings. |
| User ID | ID of the user to delete. Required when deleting a user (partial or full). |
Additional Options details (for Create User operation):
- Webhook URL: URL to receive event notifications.
- Events: Types of events to subscribe to (e.g., All, Message, Presence).
- Proxy Configuration: Enable/disable proxy and specify proxy URL.
- S3 Configuration: Settings for S3 storage including access keys, bucket name, endpoint, region, media delivery method (Base64, S3, Both), retention days, and public URL.
Output
The node outputs JSON data representing the result of the performed operation:
- For List Users, it returns an array of user objects retrieved from the API.
- For Create User, it returns the created user's details as provided by the API.
- For Delete User and Delete User Full, it returns confirmation or status of the deletion operation.
If an error occurs and the node is set to continue on failure, the output will contain an object with an error field describing the issue.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Wuzapi Admin API.
- The node makes HTTP requests to the Wuzapi Admin API endpoints.
- Proper configuration of the API base URL and admin token is necessary in the credentials.
- If using proxy or S3 options, those external services must be properly configured and accessible.
Troubleshooting
Common issues:
- Invalid or missing API authentication token will cause authorization errors.
- Providing an incorrect or non-existent User ID when deleting users will result in not found errors.
- Misconfigured webhook URLs or proxy settings may cause failures in user creation.
- Missing required parameters like User Name or User Token during user creation will cause validation errors.
Error messages:
- Errors returned from the API are passed through; typical messages include authorization failures, validation errors, or resource not found.
- To resolve, verify credentials, ensure required fields are filled, and confirm that User IDs exist before attempting deletion.
Links and References
- Wuzapi WhatsApp API Documentation (hypothetical link)
- n8n HTTP Request Node documentation for understanding request options: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/