> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tableflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Flow Run

> Get the status and details of a flow run

Retrieves detailed information about a specific flow run, including its current status and execution history.

## Usage Notes

* The response includes the flow definition for context
* Use this endpoint to monitor flow execution progress
* Poll this endpoint to check when a flow completes
* The drive\_files object contains links to Google Drive exports (if enabled)

## Request

<ParamField path="id" type="string" required>
  The ID of the flow run
</ParamField>

## Response

<ResponseExample>
  ```json theme={null}
  {
    "id": "Wp7kRnT2mX4vQ9bL",
    "flow_id": "dk4g1tUg1uHLs8YU",
    "workspace_id": "uT2bJNWN75YPU95r",
    "status": "completed",
    "status_history": [
      {
        "status": "processing",
        "time": 1682366228,
        "message": "Flow started via api"
      },
      {
        "status": "completed",
        "time": 1682366258,
        "message": "Flow completed successfully"
      }
    ],
    "error": null,
    "metadata": {
      "customer_id": "12345",
      "order_number": "PO-2024-001"
    },
    "trigger_method": "api",
    "start_time": 1682366228,
    "end_time": 1682366258,
    "duration": 30000,
    "drive_files": {
      "reconciliation": {
        "file_id": "1ABC123DEF456",
        "mime_type": "application/vnd.google-apps.spreadsheet",
        "sheets": [
          {
            "sheet_id": 0,
            "title": "Reconciliation Results"
          }
        ]
      }
    },
    "flow": {
      "id": "dk4g1tUg1uHLs8YU",
      "workspace_id": "uT2bJNWN75YPU95r",
      "name": "PO to Invoice Reconciliation",
      "description": "Match purchase orders with invoices and verify totals",
      "steps": [
        {
          "id": "step_1",
          "title": "Extract Purchase Order",
          "type": "extraction"
        },
        {
          "id": "step_2",
          "title": "Extract Invoice",
          "type": "extraction"
        },
        {
          "id": "step_3",
          "title": "Reconcile Documents",
          "type": "reconciliation"
        }
      ],
      "active": true
    },
    "created_at": 1682366228,
    "updated_at": 1682366258
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.tableflow.com/v2/flows/runs/Wp7kRnT2mX4vQ9bL \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.tableflow.com/v2/flows/runs/Wp7kRnT2mX4vQ9bL",
      headers={
          "Authorization": "Bearer YOUR_API_KEY"
      }
  )

  flow_run = response.json()
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.tableflow.com/v2/flows/runs/Wp7kRnT2mX4vQ9bL", {
    method: "GET",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  });

  const flowRun = await response.json();
  ```
</RequestExample>

<ResponseField name="id" type="string" required>
  The unique identifier for the flow run
</ResponseField>

<ResponseField name="flow_id" type="string" required>
  The ID of the flow being executed
</ResponseField>

<ResponseField name="workspace_id" type="string" required>
  The workspace ID
</ResponseField>

<ResponseField name="status" type="string" required>
  Current status of the flow run

  * `processing` - Flow is currently executing
  * `review` - Flow is paused for human review
  * `completed` - Flow completed successfully
  * `failed` - Flow failed (check error field)
</ResponseField>

<ResponseField name="status_history" type="array" required>
  History of status changes

  <Expandable title="Status History Entry">
    <ResponseField name="status" type="string" required>
      The status value
    </ResponseField>

    <ResponseField name="time" type="number" required>
      Unix timestamp of the status change
    </ResponseField>

    <ResponseField name="message" type="string" required>
      Description of the status change
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="error" type="string">
  Error message if the flow run failed
</ResponseField>

<ResponseField name="metadata" type="object">
  Custom metadata provided when running the flow
</ResponseField>

<ResponseField name="trigger_method" type="string" required>
  How the flow was triggered: api or manual
</ResponseField>

<ResponseField name="start_time" type="number" required>
  Unix timestamp when the flow run started
</ResponseField>

<ResponseField name="end_time" type="number">
  Unix timestamp when the flow run completed
</ResponseField>

<ResponseField name="duration" type="number" required>
  Duration of the flow run in milliseconds
</ResponseField>

<ResponseField name="drive_files" type="object">
  Google Drive files created during the flow (if Google Drive integration is enabled).
</ResponseField>

<ResponseField name="flow_attempts" type="array">
  History of flow execution attempts, including retries. Each attempt contains
  details about step executions for that attempt.
</ResponseField>

<ResponseField name="current_attempt" type="integer">
  The current attempt number (1-based). Increments when a flow is rerun.
</ResponseField>

<ResponseField name="input_files" type="object">
  Map of file field keys to the files that were uploaded for this flow run,
  including file names, types, and sizes.
</ResponseField>

<ResponseField name="steps" type="array">
  Step execution details for all attempts. Each step execution includes
  the step ID, status, timing, and any outputs or errors.
</ResponseField>

<ResponseField name="flow" type="object">
  The flow definition at the time of execution (included for context).
</ResponseField>

<ResponseField name="created_at" type="number" required>
  Unix timestamp when the flow run was created
</ResponseField>

<ResponseField name="updated_at" type="number" required>
  Unix timestamp when the flow run was last updated
</ResponseField>
