N8N Tools - Uazapi icon

N8N Tools - Uazapi

Complete Uazapi integration - Premium WhatsApp API with advanced messaging and automation

Overview

The "Leave Group" operation in the Group resource allows a WhatsApp user (via the API) to leave a specified WhatsApp group. This node action is useful for automating group membership management, such as when a user or bot needs to exit groups after certain events or conditions are met.

Practical examples include:

  • Automatically leaving a group after completing a campaign or event.
  • Leaving groups that are no longer relevant to reduce clutter.
  • Managing group memberships programmatically in workflows involving multiple WhatsApp groups.

Properties

Name Meaning
Group ID The unique identifier of the WhatsApp group to leave.
Additional Fields Optional extra parameters:
- Reply to Message ID: ID of a message to reply to.
- Delay (seconds): Wait time before sending the leave request.
- Disable Link Preview: Whether to disable link previews (not typically relevant here).
- Mention Users: Phone numbers to mention (comma-separated, not typical for leaving group).

Output

The node outputs a JSON object containing the response from the WhatsApp API proxy service regarding the leave group request. This typically includes confirmation of the action or error details if the operation failed.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "json": {
    "status": "success",
    "message": "Left group successfully",
    "groupId": "123456789@g.us"
  }
}

Or in case of failure:

{
  "json": {
    "error": "Group not found or insufficient permissions"
  }
}

Dependencies

  • Requires an active WhatsApp API instance configured with the Uazapi service.
  • Needs an API key credential and authentication token for the Uazapi API.
  • The node uses a proxy endpoint hosted at https://n8ntools.io/api/v1/proxy/uazapi to forward requests.
  • Proper configuration of the WhatsApp instance ID is necessary.

Troubleshooting

  • Common Issues:

    • Invalid or missing Group ID: Ensure the Group ID is correct and corresponds to an existing WhatsApp group.
    • Insufficient permissions: The authenticated WhatsApp instance must have permission to leave the group.
    • Network or API errors: Check API credentials and network connectivity.
  • Error Messages:

    • "Group not found": Verify the Group ID is accurate.
    • "Unauthorized" or "Invalid token": Confirm API keys and tokens are valid and not expired.
    • "Failed to leave group": Could indicate server-side issues or restrictions; retry or check API status.

Links and References

Discussion