Airbyte · Arazzo Workflow

Airbyte Find a Connection and Trigger Its Sync

Version 1.0.0

List the connections in a workspace, branch on whether any exist, then trigger and confirm a sync for the first connection.

1 workflow 1 source API 1 provider
View Spec View on GitHub Data IntegrationETLELTOpen SourceData PipelineConnectorsDataArazzoWorkflows

Provider

airbyte

Workflows

find-connection-and-sync
Find the first connection in a workspace and trigger a sync for it.
Lists connections in a workspace, and if any exist triggers a sync for the first one and confirms the job started.
3 steps inputs: workspaceId outputs: connectionId, jobId, jobStatus
1
listConnections
listConnections
List the connections in the workspace. Branch on whether any connections were returned.
2
triggerSync
createJob
Trigger a sync job for the first connection returned by the list step.
3
confirmJob
getJob
Read the triggered job back by id to confirm it has been accepted and is pending or running.

Source API Descriptions

Arazzo Workflow Specification

airbyte-find-connection-and-sync-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Airbyte Find a Connection and Trigger Its Sync
  summary: List the connections in a workspace, branch on whether any exist, then trigger and confirm a sync for the first connection.
  description: >-
    Discovers connections in a workspace and then acts on the result. The list
    step branches: when at least one connection exists it triggers a sync for
    the first connection and reads the resulting job back to confirm it
    started; when no connections exist it ends without triggering anything.
    Every step inlines its request so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: airbyteApi
  url: ../openapi/airbyte-openapi.yml
  type: openapi
workflows:
- workflowId: find-connection-and-sync
  summary: Find the first connection in a workspace and trigger a sync for it.
  description: >-
    Lists connections in a workspace, and if any exist triggers a sync for the
    first one and confirms the job started.
  inputs:
    type: object
    required:
    - workspaceId
    properties:
      workspaceId:
        type: string
        description: The UUID of the workspace to list connections for.
  steps:
  - stepId: listConnections
    description: >-
      List the connections in the workspace. Branch on whether any connections
      were returned.
    operationId: listConnections
    parameters:
    - name: workspaceIds
      in: query
      value: $inputs.workspaceId
    - name: limit
      in: query
      value: 100
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      connectionId: $response.body#/data/0/connectionId
      connections: $response.body#/data
    onSuccess:
    - name: hasConnections
      type: goto
      stepId: triggerSync
      criteria:
      - context: $response.body
        condition: $.data.length > 0
        type: jsonpath
    - name: noConnections
      type: end
      criteria:
      - context: $response.body
        condition: $.data.length == 0
        type: jsonpath
  - stepId: triggerSync
    description: Trigger a sync job for the first connection returned by the list step.
    operationId: createJob
    requestBody:
      contentType: application/json
      payload:
        connectionId: $steps.listConnections.outputs.connectionId
        jobType: sync
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      jobId: $response.body#/jobId
      status: $response.body#/status
  - stepId: confirmJob
    description: >-
      Read the triggered job back by id to confirm it has been accepted and is
      pending or running.
    operationId: getJob
    parameters:
    - name: jobId
      in: path
      value: $steps.triggerSync.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
      jobType: $response.body#/jobType
  outputs:
    connectionId: $steps.listConnections.outputs.connectionId
    jobId: $steps.triggerSync.outputs.jobId
    jobStatus: $steps.confirmJob.outputs.status