Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Group → Leave Group
AI-generatedOverview
The "Leave Group" operation in the Maytapi node allows a WhatsApp user (via the Maytapi API) to leave a specified WhatsApp group. This is useful for automating group management tasks, such as removing a bot or user from groups they no longer need to participate in.
Typical use cases include:
- Automatically leaving groups after certain events or triggers.
- Managing group memberships programmatically in workflows.
- Cleaning up group participation without manual intervention.
For example, you might configure this node to leave a group when a project ends or when a user unsubscribes from notifications sent via WhatsApp groups.
Properties
| Name | Meaning |
|---|---|
| Phone ID Source | Select how to provide the Phone ID: either "From Credentials" (uses stored credential) 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 to leave, formatted as a conversation ID with @g.us suffix (e.g., 905301234567-1574073754@g.us). |
Output
The node outputs a JSON object representing the response from the Maytapi API after attempting to leave the group. The exact structure depends on the API's response but typically includes success status and any relevant messages or error details.
No binary data output is produced by this operation.
Example output JSON structure:
{
"success": true,
"message": "Left the group successfully"
}
or in case of failure:
{
"error": "Group not found or already left"
}
Dependencies
- Requires an active Maytapi API key credential configured in n8n.
- The Phone ID must be provided either via credentials or custom input.
- Internet access to call the Maytapi API endpoint
POST /leaveGroup.
Troubleshooting
- Missing Phone ID: If neither credentials nor custom Phone ID is provided, the node will throw an error stating that Phone ID is required.
- Invalid Group ID: Providing an incorrect or malformed Group ID may cause the API to return an error. Ensure the Group ID includes the
@g.ussuffix and is accurate. - API Errors: Network issues or invalid API keys can cause failures. Verify your API key and network connectivity.
- Permission Issues: The WhatsApp instance associated with the Phone ID must have permission to leave the specified group.