WhatsApp · Arazzo Workflow

WhatsApp Create Template then Send

Version 1.0.0

Create a new message template and send it once it is available.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArazzoWorkflows

Provider

whatsapp

Workflows

create-template-then-send
Create a message template and send it when it returns APPROVED.
Creates a new message template with a single BODY component, and only when the create response reports the template as APPROVED sends a template message to the recipient. When the template is still PENDING the workflow ends.
2 steps inputs: accessToken, bodyText, category, language, phoneNumberId, templateName, to, wabaId outputs: messageId, templateId
1
createTemplate
Create a new message template with a single BODY component on the WhatsApp Business Account.
2
sendTemplate
Send a template message to the recipient referencing the newly approved template by name and language.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: WhatsApp Create Template then Send
  summary: Create a new message template and send it once it is available.
  description: >-
    Provisions a brand new message template on a WhatsApp Business Account and
    then attempts to send it. Because Meta must approve new templates before
    they can be delivered, the workflow branches on the create response status:
    when the template is already APPROVED it sends immediately, and otherwise it
    ends so the caller can wait for approval. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: messageTemplatesApi
  url: ../openapi/whatsapp-message-templates-api-openapi.yml
  type: openapi
- name: messagesApi
  url: ../openapi/whatsapp-messages-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-template-then-send
  summary: Create a message template and send it when it returns APPROVED.
  description: >-
    Creates a new message template with a single BODY component, and only when
    the create response reports the template as APPROVED sends a template message
    to the recipient. When the template is still PENDING the workflow ends.
  inputs:
    type: object
    required:
    - accessToken
    - wabaId
    - phoneNumberId
    - to
    - templateName
    - language
    - bodyText
    properties:
      accessToken:
        type: string
        description: Access token with whatsapp_business_management and whatsapp_business_messaging permissions.
      wabaId:
        type: string
        description: The WhatsApp Business Account ID to create the template on.
      phoneNumberId:
        type: string
        description: The WhatsApp phone number ID that sends the message.
      to:
        type: string
        description: Recipient phone number in E.164 format without the leading plus.
      templateName:
        type: string
        description: Lowercase template name using letters, digits, and underscores only.
      language:
        type: string
        description: Template language/locale code (e.g. en_US).
      bodyText:
        type: string
        description: The body text content of the template.
      category:
        type: string
        description: Template category (AUTHENTICATION, MARKETING, or UTILITY).
        default: UTILITY
  steps:
  - stepId: createTemplate
    description: >-
      Create a new message template with a single BODY component on the WhatsApp
      Business Account.
    operationId: createMessageTemplate
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: waba-id
      in: path
      value: $inputs.wabaId
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.templateName
        language: $inputs.language
        category: $inputs.category
        components:
        - type: BODY
          text: $inputs.bodyText
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      templateId: $response.body#/id
      templateStatus: $response.body#/status
    onSuccess:
    - name: templateApproved
      type: goto
      stepId: sendTemplate
      criteria:
      - context: $response.body
        condition: $.status == "APPROVED"
        type: jsonpath
    - name: templatePending
      type: end
      criteria:
      - context: $response.body
        condition: $.status != "APPROVED"
        type: jsonpath
  - stepId: sendTemplate
    description: >-
      Send a template message to the recipient referencing the newly approved
      template by name and language.
    operationId: sendMessage
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: phone-number-id
      in: path
      value: $inputs.phoneNumberId
    requestBody:
      contentType: application/json
      payload:
        messaging_product: whatsapp
        recipient_type: individual
        to: $inputs.to
        type: template
        template:
          name: $inputs.templateName
          language:
            code: $inputs.language
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      messageId: $response.body#/messages/0/id
  outputs:
    templateId: $steps.createTemplate.outputs.templateId
    messageId: $steps.sendTemplate.outputs.messageId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/whatsapp-create-template-then-send-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.