capabilities.work

Trigger Workflow and Track Recipient Run

A 3-step recipe with Knock. We can help you get access.

Recipe · 3 steps

Trigger Workflow and Track Recipient Run

with Knock
Works with AI assistants

Trigger a workflow then poll the recipient run to completion.

  1. Trigger the named workflow for the supplied recipient and capture the returned workflow_run_id.
  2. List recipient runs for the triggered workflow and recipient to resolve the per-recipient run id created by the trigger.
  3. 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.
What you'll need to have ready
  • apiKey: Knock secret API key (sk_...) used as a Bearer token.
  • workflowKey: The key of the workflow to trigger and filter runs by.
  • recipientId: The user id to trigger the workflow for.
  • data: Optional data payload passed into the workflow run.
For your developer

Arazzo workflow knock-app:trigger-workflow-track-recipient-run, 3 operations: {$sourceDescriptions.workflowsApi.url}#/paths/~1v1~1workflows~1{key}~1trigger/post → listWorkflowRecipientRuns → getWorkflowRecipientRun. Specs on APIs.io.