Temporal · Arazzo Workflow

Temporal Track an Async Operation to Completion

Version 1.0.0

Poll a Temporal Cloud async operation until it leaves the pending state, branching on outcome.

1 workflow 1 source API 1 provider
View Spec View on GitHub Pro-Code-API-CompositionWorkflowsArazzoWorkflows

Provider

temporal

Workflows

track-async-operation
Poll an async operation until terminal and branch on success or failure.
Repeatedly calls getAsyncOperation, looping while the state field equals pending, then branching on whether the terminal state indicates failure (failureReason populated) or success.
1 step inputs: asyncOperationId, bearerToken outputs: failureReason, finishedTime, operationType, state
1
pollOperation
Poll the async operation status. While state equals pending the step loops back onto itself; once terminal it branches on the outcome.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Temporal Track an Async Operation to Completion
  summary: Poll a Temporal Cloud async operation until it leaves the pending state, branching on outcome.
  description: >-
    Most Temporal Cloud control-plane mutations run asynchronously and hand back
    an asyncOperationId. This workflow polls a single async operation until its
    state field is no longer pending, then branches on whether it finished
    successfully or failed so a caller can surface the failureReason. It is the
    reusable analog of waiting for a long-running workflow execution to reach 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: asyncOperationsApi
  url: ../openapi/temporal-async-operations-api-openapi.yml
  type: openapi
workflows:
- workflowId: track-async-operation
  summary: Poll an async operation until terminal and branch on success or failure.
  description: >-
    Repeatedly calls getAsyncOperation, looping while the state field equals
    pending, then branching on whether the terminal state indicates failure
    (failureReason populated) or success.
  inputs:
    type: object
    required:
    - bearerToken
    - asyncOperationId
    properties:
      bearerToken:
        type: string
        description: API key used as the Bearer token for Authorization.
      asyncOperationId:
        type: string
        description: The async operation identifier to track to completion.
  steps:
  - stepId: pollOperation
    description: >-
      Poll the async operation status. While state equals pending the step loops
      back onto itself; once terminal it branches on the outcome.
    operationId: getAsyncOperation
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.bearerToken"
    - name: asyncOperationId
      in: path
      value: $inputs.asyncOperationId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      state: $response.body#/state
      operationType: $response.body#/operationType
      failureReason: $response.body#/failureReason
      finishedTime: $response.body#/finishedTime
    onSuccess:
    - name: stillPending
      type: goto
      stepId: pollOperation
      criteria:
      - context: $response.body
        condition: $.state == "pending"
        type: jsonpath
    - name: failed
      type: end
      criteria:
      - context: $response.body
        condition: $.failureReason != null
        type: jsonpath
    - name: succeeded
      type: end
      criteria:
      - context: $response.body
        condition: $.state != "pending"
        type: jsonpath
  outputs:
    state: $steps.pollOperation.outputs.state
    operationType: $steps.pollOperation.outputs.operationType
    failureReason: $steps.pollOperation.outputs.failureReason
    finishedTime: $steps.pollOperation.outputs.finishedTime

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/temporal-track-async-operation-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.