Run a workflow on a document
run_workflowStart a run of a deployed multi-step workflow on a document (workflows group; not runnable until a version is deployed, or pass version "draft"). Workflow runs commonly take minutes to hours: a status: "running" response is normal, not an error — NEEDS_REVIEW means paused for human review in the dashboard (see dashboardUrl). For one merged run over 2-50 related files, pass package instead of file. outputs injects pre-computed results for specific extractors/classifiers/splitters so the workflow skips recomputing them (not allowed with package). Follow any llmContext guidance included in results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Input document. Mutually exclusive with package. Exactly one of id/url/text — e.g. { "url": "https://..." } or { "id": "file_..." }, never a bare string. | |
| detail | No | "concise" (default): status, output, failure fields, dashboardUrl. "full": adds config, confidence/citations, usage, timestamps. | |
| outputs | No | Pre-computed results the workflow should use instead of recomputing those steps. Not allowed with package. | |
| package | No | 2-50 files (id/url only) processed together as one merged run. Mutually exclusive with file and with outputs. | |
| secrets | No | Secrets passed to external-data-validation steps. | |
| metadata | No | Arbitrary key-value metadata stored on the run. | |
| priority | No | Queue priority (1-100). | |
| workflow | Yes | The workflow to run. | |
| environment | Yes | "TEST" = the Test (development) environment, "PRODUCTION" = live. Must match a granted target from get_me (an API key pins one environment). | |
| waitSeconds | No | Max seconds to block waiting on the run (clamped to the server wait budget). | |
| workspaceId | Yes | Target workspace (ws_...). Must be a granted workspace — get_me lists the accepted values. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | ||
| runId | Yes | ||
| status | Yes | PROCESSED | FAILED | NEEDS_REVIEW | REJECTED | CANCELLED, or "running" (resume via the get tool). | |
| outputs | No | Per-step output values from completed steps. | |
| runType | No | ||
| llmContext | No | ||
| stepSummary | No | ||
| dashboardUrl | No | ||
| failureReason | No | ||
| failureMessage | No |