Portal Community
Irreversible action: Once the business phone number leaves a group, it cannot send messages to or read messages from that group. It must be re-invited by an existing group admin to rejoin. Use group/delete instead if you want to permanently dissolve the group entirely.
API endpoint: Calls the WhatsApp Cloud API group leave endpoint for the business phone number. Only the groupId is required — the business phone number acts as the leaving participant.

When to Use

Configuration

Connection

FieldRequiredDescription
accessTokenRequiredPermanent System User access token. Store in BizFirst Credentials Manager.
phoneNumberIdRequiredNumeric string ID of the business phone number that will leave the group.
apiVersionOptionalMeta Graph API version. Defaults to v18.0.

Operation

FieldRequiredDescription
groupIdRequiredThe WhatsApp group ID the business phone number should leave (e.g. 120363xxxxxxxxxx@g.us).
Sole-admin caution: If the business phone number is the only admin in the group, leaving may leave the group without any admin. Consider promoting another participant to admin via group/updateParticipantRole before calling group/leave, or use group/delete to dissolve the group cleanly.

Sample Configuration

{
  "resource": "group",
  "operation": "leave",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "groupId": "120363xxxxxxxxxx@g.us"
}

Validation Errors

ErrorCause
accessToken is requiredThe accessToken field is empty.
phoneNumberId is requiredNo Phone Number ID supplied.
groupId is requiredNo group ID provided.
100 (Meta)Group not found, or the business phone number is not a member of the specified group.
200 (Meta)Permission error — the access token does not have rights to perform this action on the phone number.

Output

Success Port

FieldTypeDescription
groupIdstringThe group ID that was left.
statusstring"left" — confirms the business phone number has exited the group.
rawResponsestringFull raw JSON from the Meta Graph API.

Error Port

FieldTypeDescription
groupIdstringGroup ID echoed from input.
statusstring"failed" or "error".
errorCodestringMeta error code or "timeout".
errorMessagestringHuman-readable error description.

Sample Output

{
  "groupId": "120363xxxxxxxxxx@g.us",
  "status": "left"
}

Expression Reference

ValueExpressionNotes
Leave confirmed{{ $output.leave.status }}Confirm "left" before updating your internal group membership records to reflect the bot's departure.
Group ID{{ $output.leave.groupId }}Echo of the input groupId — use to mark the group as inactive in your system of record.

Node Policies & GuardRails

Examples

Example 1 — Leave all trial groups when a customer subscription lapses

A subscription expiry event triggers a workflow that queries the database for all group IDs associated with the lapsed account, iterates over them, and leaves each:

{
  "resource": "group",
  "operation": "leave",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
  "groupId": "{{ $item.groupId }}"
}

Example 2 — Promote a backup admin then leave gracefully

To avoid leaving a group admin-less, a pre-leave workflow first promotes a designated backup admin, waits for confirmation, then leaves:

// Step 1 — promote backup admin (group/updateParticipantRole node)
{
  "resource": "group",
  "operation": "promote-admin",
  "groupId": "{{ $trigger.groupId }}",
  "participantId": "{{ $trigger.backupAdminWaId }}",
  "role": "admin"
}

// Step 2 — leave the group (group/leave node, runs after Step 1 succeeds)
{
  "resource": "group",
  "operation": "leave",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
  "groupId": "{{ $trigger.groupId }}"
}

Example 3 — Post-event cleanup with conditional branching

An event management workflow checks whether the event has concluded and the group has more than zero remaining admins. If both conditions are true, the bot leaves; otherwise it routes to a manual review step:

{
  "resource": "group",
  "operation": "leave",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
  "groupId": "{{ $nodes.EventLookup.output.groupId }}"
}