group/getInviteLink
Retrieve the shareable invite link for a WhatsApp group. The returned link can be embedded in emails, web pages, or sent as a message so recipients can join the group without being manually added.
API endpoint: Calls
GET /{groupId}/invite_link. Returns a link property in the form https://chat.whatsapp.com/{code} along with the raw code component. The business phone number must be a member of the group to retrieve the invite link.
When to Use
- Welcome email automation: After a new subscriber joins a membership programme, a workflow retrieves the VIP group invite link and embeds it in the welcome email, allowing the subscriber to join immediately without manual admin action.
- Event registration follow-up: When a participant registers for a webinar or workshop, the registration workflow fetches the event group invite link and includes it in the confirmation message.
- Course enrolment: On enrolment confirmation, an LMS workflow retrieves the course study group invite link and delivers it to the learner via their preferred channel (email or SMS).
- Dynamic link refresh: A periodic scheduled workflow checks whether existing invite links are still valid by fetching the current link; if the link has changed (e.g., after a reset), the workflow redistributes the updated link to eligible participants.
- Support ticket onboarding: When a high-priority support case is opened, a CRM workflow retrieves the dedicated case group invite link and sends it to the customer, routing them directly into the support conversation.
Configuration
Connection
| Field | Required | Description |
|---|---|---|
accessToken | Required | Permanent System User access token. Store in BizFirst Credentials Manager. |
phoneNumberId | Required | Numeric string ID of the business phone number. Must be a group member. |
apiVersion | Optional | Meta Graph API version. Defaults to v18.0. |
Operation
| Field | Required | Description |
|---|---|---|
groupId | Required | The WhatsApp group ID (e.g. 120363xxxxxxxxxx@g.us). |
Link sensitivity: Invite links grant anyone who has the link the ability to join the group. Do not expose the link publicly or store it in unsecured systems. Distribute it only through trusted, authenticated channels.
Sample Configuration
{
"resource": "group",
"operation": "get-invite-link",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "123456789012345",
"groupId": "120363xxxxxxxxxx@g.us"
}
Validation Errors
| Error | Cause |
|---|---|
accessToken is required | The accessToken field is empty. |
phoneNumberId is required | No Phone Number ID supplied. |
groupId is required | No group ID provided. |
100 (Meta) | Group not found, or the business phone number is not a member of the group. |
200 (Meta) | Permission denied — the access token lacks the required WhatsApp Business API permission scope. |
Output
Success Port
| Field | Type | Description |
|---|---|---|
groupId | string | The group ID, echoed from input. |
inviteLink | string | Full invite URL in the form https://chat.whatsapp.com/{code}. |
code | string | The raw invite code portion of the URL (the path segment after chat.whatsapp.com/). |
status | string | "success". |
rawResponse | string | Full raw JSON from the Meta Graph API. |
Error Port
| Field | Type | Description |
|---|---|---|
groupId | string | Group ID echoed from input. |
status | string | "failed" or "error". |
errorCode | string | Meta error code or "timeout". |
errorMessage | string | Human-readable error description. |
Sample Output
{
"groupId": "120363xxxxxxxxxx@g.us",
"inviteLink": "https://chat.whatsapp.com/AbCdEfGhIjK1234567890",
"code": "AbCdEfGhIjK1234567890",
"status": "success"
}
Expression Reference
| Value | Expression | Notes |
|---|---|---|
| Full invite link | {{ $output.getInviteLink.inviteLink }} | Embed directly in an email body, SMS, or as a button URL in an interactive message. |
| Raw code only | {{ $output.getInviteLink.code }} | Use when you need to construct a custom deep-link or store only the code in a database. |
| Group ID | {{ $output.getInviteLink.groupId }} | Echo of the input groupId — useful for correlation when processing multiple groups in a loop. |
Node Policies & GuardRails
- Link exposure risk: WhatsApp invite links are open — anyone with the link can join the group. Transmit the link only over authenticated and encrypted channels (e.g., a personalised email via a transactional email service, not a public web page).
- Link validity: Group admins can reset the invite link at any time through the WhatsApp app. If your workflow caches the link, schedule a periodic refresh using this operation to detect any changes.
- Membership prerequisite: The business phone number must be a current group member to retrieve the link. If it has left or been removed, the API returns a
100error. Check membership status withgroup/getParticipantsfirst when in doubt. - Credential storage: Always store
accessTokenin BizFirst Credentials Manager and reference it via{{ $credentials.* }}. Never hard-code tokens in the configuration. - Rate limiting: Frequent calls to retrieve the same group's invite link are unnecessary. Cache the result in your workflow context or a database node and only refresh on a schedule or when a reset is detected.
Examples
Example 1 — Retrieve invite link and send in a welcome email
A new member registration trigger fires. The workflow fetches the group invite link, then passes it to an email node:
// Step 1 — Get the invite link (group/getInviteLink node)
{
"resource": "group",
"operation": "get-invite-link",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
"groupId": "{{ $env.VIP_GROUP_ID }}"
}
// Step 2 — Send welcome email (Email node, references Step 1 output)
{
"to": "{{ $trigger.email }}",
"subject": "Welcome — join our VIP WhatsApp group",
"body": "Click here to join: {{ $nodes.GetInviteLink.output.inviteLink }}"
}
Example 2 — Dynamically embed the link in a WhatsApp message
When a customer books a service, the workflow retrieves the support group link and sends it as a WhatsApp text message to the customer's personal number:
// Step 1 — Get invite link
{
"resource": "group",
"operation": "get-invite-link",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
"groupId": "{{ $nodes.BookingLookup.output.supportGroupId }}"
}
// Step 2 — Send message with the link (message/sendText node)
{
"resource": "message",
"operation": "sendText",
"to": "{{ $trigger.customerPhone }}",
"text": "Your support group is ready. Join here: {{ $nodes.GetInviteLink.output.inviteLink }}"
}
Example 3 — Bulk link refresh on a nightly schedule
A scheduled cron workflow runs each night, reads all active group IDs from a database, fetches each group's current invite link, and updates the database record if the link has changed:
{
"resource": "group",
"operation": "get-invite-link",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "{{ $env.WA_PHONE_NUMBER_ID }}",
"groupId": "{{ $item.groupId }}"
}
// Compare {{ $output.getInviteLink.inviteLink }} with {{ $item.storedLink }}
// If different, update the database record via a DB node