When to Use
- Approval status polling: After calling
template/create, a scheduled workflow polls this node every few hours to check whether the template status has changed from PENDING to APPROVED or REJECTED.
- Pre-send validation: Before a bulk send campaign, a workflow calls this node to confirm the target template is in
APPROVED status — if not, it halts the send and notifies the campaign manager.
- Rejection reason inspection: When a template is rejected, this node retrieves the full response including the rejection reason so the workflow can log it and trigger a notification to the template owner.
- Component audit: A compliance workflow retrieves the current component JSON to verify that the template content matches the approved version stored in the audit log.
- Dynamic send configuration: A workflow retrieves a template's component structure at runtime to dynamically build the variable payload for
message/sendTemplate.
Configuration
Connection
| Field | Required | Description |
accessToken | Required | Permanent System User access token from Meta Business Manager. Store in BizFirst Credentials Manager. |
phoneNumberId | Required | WhatsApp Business phone number ID associated with the account owning the template. |
apiVersion | Optional | Meta Graph API version, e.g. v18.0. Defaults to v18.0. |
Operation
| Field | Required | Description |
templateId | Required | The numeric ID of the template to retrieve. Obtained from the output of template/create or template/getMany. |
Sample Configuration
{
"resource": "template",
"operation": "get",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "123456789012345",
"templateId": "{{ $input.templateId }}"
}
Validation Errors
| Error | Cause |
accessToken is required | The accessToken field is empty or missing. |
phoneNumberId is required | The phoneNumberId field is empty or missing. |
templateId is required | The templateId field is empty or missing. |
100 (Meta) | Template ID does not exist or belongs to a different business account. |
190 (Meta) | Access token expired or invalid. |
200 (Meta) | Insufficient permissions. The token requires whatsapp_business_management scope. |
Output
Success Port
Fires when the template details are successfully retrieved from Meta.
| Field | Type | Description |
id | string | The template ID. |
name | string | The template name (e.g. order_shipped_notification). |
language | string | The language code (e.g. en_US). |
templateStatus | string | Current approval status: APPROVED, PENDING, or REJECTED. |
category | string | Template category: UTILITY, MARKETING, or AUTHENTICATION. |
componentsJson | string | JSON string of the template's component array (HEADER, BODY, FOOTER, BUTTONS). |
status | string | "success" on success. |
errorCode | string | Empty on success. |
errorMessage | string | Empty on success. |
rawResponse | string | Full raw JSON response from Meta. |
Error Port
Fires when Meta cannot locate the template or authentication fails.
| Field | Type | Description |
status | string | "failed" or "error". |
errorCode | string | Meta error code. |
errorMessage | string | Human-readable description. |
rawResponse | string | Raw API error JSON for diagnostics. |
Sample Output
{
"id": "987654321098765",
"name": "order_shipped_notification",
"language": "en_US",
"templateStatus": "APPROVED",
"category": "UTILITY",
"componentsJson": "[{\"type\":\"HEADER\",\"format\":\"TEXT\",\"text\":\"Your Order Has Shipped\"},{\"type\":\"BODY\",\"text\":\"Hi {{1}}, your order #{{2}} has been shipped.\"}]",
"status": "success",
"errorCode": null,
"errorMessage": null,
"rawResponse": "{\"id\":\"987654321098765\",\"name\":\"order_shipped_notification\",\"language\":\"en_US\",\"status\":\"APPROVED\",\"category\":\"UTILITY\",\"components\":[...]}"
}
Expression Reference
| Value | Expression | Notes |
| Template ID | {{ $output.getTemplate.id }} | Echoed ID for chaining to other template operations. |
| Approval status | {{ $output.getTemplate.templateStatus }} | Use in an IfCondition: branch on "APPROVED" to proceed with send, "REJECTED" to notify owner. |
| Template name | {{ $output.getTemplate.name }} | Human-readable name for logging and notifications. |
| Components JSON | {{ $output.getTemplate.componentsJson }} | Parse with JsonTransform to extract body text or variable count. |
| Category | {{ $output.getTemplate.category }} | Use to validate the template type matches the intended use case before sending. |
Node Policies & GuardRails
| Policy Area | Recommendation |
| Polling frequency | When waiting for approval, poll no more than once every 4 hours. Excessive polling can trigger rate limits. Use a scheduled trigger with an appropriate interval. |
| Status-based branching | Always check templateStatus before using a template in a send operation. A PENDING or REJECTED template will cause message send failures. |
| Credential storage | Store the access token in BizFirst Credentials Manager. Never paste it into node configuration as plain text. |
| Error port handling | Always connect the error port. A 100 error (not found) should trigger a workflow alert — a template that was previously working may have been deleted. |
| Caching approved templates | Once a template reaches APPROVED status, cache the result in a workflow variable for 24 hours to avoid unnecessary API calls before each send. |
Examples
Poll for Approval After Creation
{
"resource": "template",
"operation": "get",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "123456789012345",
"templateId": "{{ $session.createdTemplateId }}"
}
A scheduled workflow fires every 4 hours. It retrieves the template and checks templateStatus in a Switch node: APPROVED routes to an update-database node and stops the scheduler; REJECTED routes to a Slack notification node; PENDING re-schedules the next check.
Pre-Send Validation Gate
{
"resource": "template",
"operation": "get",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "123456789012345",
"templateId": "{{ $input.campaignTemplateId }}"
}
Before launching a bulk send campaign, this node retrieves the template. An IfCondition node checks that templateStatus == "APPROVED". If true, the workflow proceeds to the send loop. If false, the workflow aborts and sends an alert email to the campaign manager with the current status and rejection reason if available.
Component Audit for Compliance
{
"resource": "template",
"operation": "get",
"accessToken": "{{ $credentials.whatsAppToken }}",
"phoneNumberId": "123456789012345",
"templateId": "{{ $input.auditTemplateId }}"
}
A weekly compliance audit workflow retrieves every active template, compares the componentsJson against the version stored in the compliance database, and flags any discrepancies. This detects unauthorised template modifications that may have been made directly in Meta Business Manager.