Knock · Arazzo Workflow

Knock Trigger Workflow and Track Recipient Run

Version 1.0.0

Trigger a workflow and poll its per-recipient run until it completes.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub NotificationMessagingInfrastructureWorkflowsCross-ChannelEmailSMSPushIn-AppChatSlackWebhookMCPAI AgentsDeveloper PlatformArazzoWorkflows

Provider

knock-app

Workflows

trigger-workflow-track-recipient-run
Trigger a workflow then poll the recipient run to completion.
Triggers the named workflow for a single recipient, resolves the recipient run id for that workflow, and polls the run detail until it is completed or cancelled.
3 steps inputs: apiKey, data, recipientId, workflowKey outputs: finalStatus, recipientRunId, workflowRunId
1
triggerWorkflow
{$sourceDescriptions.workflowsApi.url}#/paths/~1v1~1workflows~1{key}~1trigger/post
Trigger the named workflow for the supplied recipient and capture the returned workflow_run_id.
2
listRecipientRuns
List recipient runs for the triggered workflow and recipient to resolve the per-recipient run id created by the trigger.
3
pollRecipientRun
Fetch the recipient run detail and check whether it has reached a terminal status. Re-runs this step while the run is still queued or processing.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Knock Trigger Workflow and Track Recipient Run
  summary: Trigger a workflow and poll its per-recipient run until it completes.
  description: >-
    Workflow runs in Knock are asynchronous, so this flow triggers a workflow,
    lists the workflow recipient runs for the triggered run to locate the
    per-recipient run id, and then polls that run with getWorkflowRecipientRun
    until it reaches a terminal status. 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: workflowRecipientRunsApi
  url: ../openapi/knock-app-workflow-recipient-runs-api-openapi.yml
  type: openapi
- name: workflowsApi
  url: ../openapi/knock-app-workflows-api-openapi.yml
  type: openapi
workflows:
- workflowId: trigger-workflow-track-recipient-run
  summary: Trigger a workflow then poll the recipient run to completion.
  description: >-
    Triggers the named workflow for a single recipient, resolves the recipient
    run id for that workflow, and polls the run detail until it is completed or
    cancelled.
  inputs:
    type: object
    required:
    - apiKey
    - workflowKey
    - recipientId
    properties:
      apiKey:
        type: string
        description: Knock secret API key (sk_...) used as a Bearer token.
      workflowKey:
        type: string
        description: The key of the workflow to trigger and filter runs by.
      recipientId:
        type: string
        description: The user id to trigger the workflow for.
      data:
        type: object
        description: Optional data payload passed into the workflow run.
  steps:
  - stepId: triggerWorkflow
    description: >-
      Trigger the named workflow for the supplied recipient and capture the
      returned workflow_run_id.
    operationPath: '{$sourceDescriptions.workflowsApi.url}#/paths/~1v1~1workflows~1{key}~1trigger/post'
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: key
      in: path
      value: $inputs.workflowKey
    requestBody:
      contentType: application/json
      payload:
        recipients:
        - $inputs.recipientId
        data: $inputs.data
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      workflowRunId: $response.body#/workflow_run_id
  - stepId: listRecipientRuns
    description: >-
      List recipient runs for the triggered workflow and recipient to resolve
      the per-recipient run id created by the trigger.
    operationId: listWorkflowRecipientRuns
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: workflow
      in: query
      value: $inputs.workflowKey
    - name: recipient
      in: query
      value: $inputs.recipientId
    - name: page_size
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      recipientRunId: $response.body#/entries/0/id
  - stepId: pollRecipientRun
    description: >-
      Fetch the recipient run detail and check whether it has reached a terminal
      status. Re-runs this step while the run is still queued or processing.
    operationId: getWorkflowRecipientRun
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    - name: id
      in: path
      value: $steps.listRecipientRuns.outputs.recipientRunId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      runStatus: $response.body#/status
      runId: $response.body#/id
    onSuccess:
    - name: runFinished
      type: end
      criteria:
      - context: $response.body
        condition: $.status == 'completed' || $.status == 'cancelled'
        type: jsonpath
    - name: runStillRunning
      type: goto
      stepId: pollRecipientRun
      criteria:
      - context: $response.body
        condition: $.status == 'queued' || $.status == 'processing' || $.status == 'paused'
        type: jsonpath
  outputs:
    workflowRunId: $steps.triggerWorkflow.outputs.workflowRunId
    recipientRunId: $steps.pollRecipientRun.outputs.runId
    finalStatus: $steps.pollRecipientRun.outputs.runStatus

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/knock-app-trigger-workflow-track-recipient-run-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.