Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Overview
This node integrates with the Green API service to manage WhatsApp groups and perform various group-related actions. Specifically, the "Remove Admin" operation allows you to remove admin rights from a participant in a WhatsApp group.
Use cases include:
- Managing group roles dynamically by revoking admin privileges when necessary.
- Automating group administration tasks within workflows.
- Ensuring proper access control in WhatsApp groups via automated processes.
For example, you can use this node to automatically remove admin rights from a user who no longer should have elevated permissions in a group, triggered by an external event or condition.
Properties
| Name | Meaning |
|---|---|
| Mode | Select between "Action" (execute WhatsApp actions) or "Listen for Incoming Webhook" (trigger workflows on webhooks). For this operation, use "Action". |
| Group ID | The unique identifier of the WhatsApp group where the admin rights will be removed. |
| Participant Chat ID | The chat ID of the participant whose admin rights you want to remove (e.g., phone number with WhatsApp suffix). |
Output
The node outputs a JSON array containing the response from the Green API for each execution item. The JSON structure typically includes confirmation of the admin removal action or error details if the operation failed.
No binary data output is involved in this operation.
Example output JSON snippet:
[
{
"status": "success",
"message": "Admin rights removed",
"groupId": "972501234567-1587570015@g.us",
"participantChatId": "972501234567@c.us"
}
]
(Note: Actual response fields depend on the Green API's response format.)
Dependencies
- Requires an active Green API account with valid credentials (instance ID and API token).
- The node uses HTTP POST requests to the Green API endpoints.
- Proper configuration of the Green API credentials in n8n is necessary.
- Network access to
https://api.green-api.commust be available.
Troubleshooting
Common Issues:
- Invalid or missing Group ID or Participant Chat ID parameters.
- Incorrect or expired API credentials.
- Network connectivity issues preventing API calls.
- Insufficient permissions in the WhatsApp group to modify admin roles.
Error Messages:
"Failed to remove admin: <error message>": Indicates the API call failed; check the error message for details such as invalid IDs or permission errors."Error processing group operation removeAdmin: <error message>": General error during execution; verify input parameters and credentials.
Resolutions:
- Double-check that the Group ID and Participant Chat ID are correctly formatted and correspond to existing entities.
- Ensure the API credentials are valid and have not expired.
- Confirm that the bot or account associated with the API has admin rights to change other admins.
- Verify network connectivity and firewall settings allow outbound HTTPS requests to the Green API.
Links and References
- Green API Documentation – Official API documentation for WhatsApp integration.
- WhatsApp Group Management – WhatsApp official help on group roles and permissions.
- n8n Documentation – General information on creating and using custom nodes in n8n.