Actions55
- Session Actions
- Message Actions
- Chat Actions
- Contact Actions
- Group Actions
- Webhook Actions
- Status Actions
Overview
This node integrates with the WAHA API to automate WhatsApp group management and messaging tasks. Specifically, the "Leave Group" operation under the "Group" resource allows a WhatsApp session to leave a specified group chat. This is useful in scenarios where automated workflows need to manage group memberships dynamically, such as removing a bot or user from groups after certain events or conditions are met.
Practical examples:
- Automatically leaving a promotional or support group after a campaign ends.
- Removing a session from groups when a user unsubscribes.
- Managing group memberships in bulk via automation.
Properties
| Name | Meaning |
|---|---|
| Session Name | The name of the WhatsApp session to use for the operation. Defaults to the credential's default session. |
| Chat ID | The unique identifier of the WhatsApp group to leave. Format example: groupid@g.us. |
| Additional Fields | A collection of optional fields (not used specifically in Leave Group but available for other operations). |
Note: For the "Leave Group" operation, only "Session Name" and "Chat ID" are relevant input properties.
Output
The node outputs a JSON object representing the response from the WAHA API after attempting to leave the group. This typically includes confirmation of the action or error details if the operation failed.
Example output structure:
{
"success": true,
"message": "Left group successfully",
"groupId": "groupid@g.us"
}
If an error occurs, the output JSON will contain an error field describing the issue.
The node does not output binary data.
Dependencies
- Requires access to the WAHA API service with a valid API key credential.
- Optionally uses another API ("N8N Tools API") for subscription validation before making WAHA API calls.
- The node expects proper configuration of these credentials within n8n.
- The WhatsApp session referenced by "Session Name" must be active and connected.
Troubleshooting
- Invalid API Key or Subscription: If the N8N Tools API validation fails with 401 or 403 errors, check that your API keys and subscription status are correct.
- Unknown Resource or Operation Errors: These occur if the resource or operation parameters are incorrect or unsupported. Verify you selected "Group" as resource and "Leave Group" as operation.
- Session Not Found or Disconnected: If the specified WhatsApp session is not active, the API call to leave the group will fail. Ensure the session is started and connected.
- Invalid Chat ID: The group ID must be correctly formatted (e.g., ending with
@g.us). Incorrect IDs will cause errors. - Network or API Errors: General HTTP or connectivity issues may cause failures. Check network connectivity and WAHA API status.
Links and References
- WAHA API Documentation (replace with actual URL)
- WhatsApp Group Management Concepts
- n8n Documentation on Credentials
- n8n Node Development Guide