Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Group → Demote Admin
AI-generatedOverview
This node integrates with the Maytapi WhatsApp Unofficial API to manage WhatsApp groups and perform various group-related actions. Specifically, the "Demote Admin" operation allows you to demote a current admin of a WhatsApp group back to a regular participant. This is useful in scenarios where group management needs to be adjusted dynamically, such as removing administrative privileges from a user who no longer requires them or managing group roles programmatically.
Practical example:
- You have a WhatsApp group for project collaboration and want to revoke admin rights from a member who has left the project without removing them from the group entirely. Using this node's "Demote Admin" operation, you can automate that process.
Properties
| Name | Meaning |
|---|---|
| Phone ID Source | Select how to provide the Phone ID: either "From Credentials" (uses stored credentials) or "Custom" (enter manually). |
| Phone ID | The WhatsApp instance Phone ID to use (required if "Custom" Phone ID Source is selected). |
| Group ID | The unique identifier of the WhatsApp group (conversation ID ending with @g.us). |
| Participant Number | The phone number of the participant to demote (without the @c.us suffix). |
Output
The node outputs a JSON object containing the response from the Maytapi API after attempting to demote the specified group admin. The structure typically includes success status and any relevant data or error messages returned by the API.
No binary data output is involved in this operation.
Example output JSON snippet:
{
"success": true,
"message": "Admin demoted successfully"
}
Dependencies
- Requires an active Maytapi WhatsApp API account with valid API credentials.
- The node expects an API key credential configured in n8n to authenticate requests.
- The Phone ID must be provided either via credentials or manually as input.
- Internet access to the Maytapi API endpoint (
https://api.maytapi.com/api) is required.
Troubleshooting
- Missing Phone ID: If neither credentials nor custom Phone ID is provided, the node will throw an error stating "Phone ID is required." Ensure you provide a valid Phone ID.
- Invalid Group ID or Participant Number: Incorrect formatting or invalid IDs may cause API errors. Verify that the Group ID ends with
@g.usand the participant number is correct without suffixes. - API Errors: If the Maytapi API returns an error (e.g., insufficient permissions, invalid token), check your API credentials and ensure the account has the necessary rights to modify group admins.
- Network Issues: Connectivity problems to the Maytapi API endpoint will cause failures. Confirm network access and proxy settings if applicable.