Portal Community
Two internal operations — one node field: Set role to "admin" to promote (POST /{groupId}/admins with action: "promote") or to "member" to demote (DELETE /{groupId}/admins/{phoneId}). Retrieve the participant's wa_id from group/getParticipants before calling this operation.

When to Use

Configuration

Connection

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

Operation

FieldRequiredDescription
groupIdRequiredThe WhatsApp group ID (e.g. 120363xxxxxxxxxx@g.us).
participantIdRequiredThe participant's WhatsApp ID (wa_id from group/getParticipants).
roleRequiredTarget role. Accepted values: "admin" (promote) or "member" (demote).
Admin-only action: The business phone number must already be a group admin. Attempting to change roles without admin status returns a Meta error code 200. You cannot demote yourself if you are the only remaining admin — the group must always have at least one admin.

Sample Configuration

Promote to admin

{
  "resource": "group",
  "operation": "promote-admin",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "groupId": "120363xxxxxxxxxx@g.us",
  "participantId": "14155552671",
  "role": "admin"
}

Demote to member

{
  "resource": "group",
  "operation": "demote-admin",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "groupId": "120363xxxxxxxxxx@g.us",
  "participantId": "14155552671",
  "role": "member"
}
Internal operation names: The node maps the role field to an internal operation automatically. When role is "admin" the internal operation is promote-admin; when role is "member" the internal operation is demote-admin. You can also supply the internal operation name directly in the operation field if you prefer.

Validation Errors

ErrorCause
accessToken is requiredThe accessToken field is empty.
phoneNumberId is requiredNo Phone Number ID supplied.
groupId is requiredNo group ID provided.
participantId is requiredNo participant WA ID provided.
role must be "admin" or "member"The role value is missing or not one of the two accepted strings.
100 (Meta)Group not found or participant is not a member of the group.
200 (Meta)Business phone number is not a group admin, or attempting to demote the sole remaining admin.

Output

Success Port

FieldTypeDescription
groupIdstringThe group ID.
statusstring"admin_promoted" when promoting; "admin_demoted" when demoting.
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

Promote

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

Demote

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

Expression Reference

ValueExpressionNotes
Role change result{{ $output.updateParticipantRole.status }}Check for "admin_promoted" or "admin_demoted" to confirm the change before updating your internal role store.
Group ID{{ $output.updateParticipantRole.groupId }}Echo of the input groupId — useful for chaining into a subsequent group/getParticipants call to verify the updated roles.

Node Policies & GuardRails

Examples

Example 1 — Promote a new team lead when an HR event fires

An HR system publishes a role_changed event. A webhook trigger receives the event, looks up the employee's WhatsApp ID from a CRM lookup node, then promotes them:

{
  "resource": "group",
  "operation": "promote-admin",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
  "groupId": "{{ $trigger.body.groupId }}",
  "participantId": "{{ $nodes.CrmLookup.output.waId }}",
  "role": "admin"
}

Example 2 — Demote a moderator when their tenure ends

A scheduled workflow reads a list of moderators whose term has expired from a database, iterates over them, and demotes each in the relevant group:

{
  "resource": "group",
  "operation": "demote-admin",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
  "groupId": "{{ $item.groupId }}",
  "participantId": "{{ $item.waId }}",
  "role": "member"
}

Example 3 — Conditional role assignment based on a form response

A form collects nominations for a community leader. The workflow evaluates the nomination and branches: if approved, it promotes; if rejected, it demotes any existing interim admin:

{
  "resource": "group",
  "operation": "{{ $nodes.EvaluateNomination.output.approved == true ? 'promote-admin' : 'demote-admin' }}",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
  "groupId": "{{ $form.groupId }}",
  "participantId": "{{ $form.nomineeWaId }}",
  "role": "{{ $nodes.EvaluateNomination.output.approved == true ? 'admin' : 'member' }}"
}