A Workflow chains multiple automation steps into a reusable template. While a Task handles a single goal on one page, a Workflow orchestrates an entire process: filling forms, validating data, downloading files, and sending results. You define the workflow once with blocks, then run it with different parameters each time.Documentation Index
Fetch the complete documentation index at: https://skyvern-mintlify-refresh-session-endpoint-1776470899.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Tasks vs Workflows
| Characteristic | Tasks | Workflows |
|---|---|---|
| Structure | Single prompt, one execution | Multiple blocks in sequence |
| Scope | Single goal, usually one page | Multi-step process across pages |
| Reusability | Run ad-hoc or scheduled | Define once, run with different parameters |
| Parameterization | Basic (prompt, URL, extraction schema) | Rich (input parameters, block outputs, Jinja templates) |
| Control Flow | Linear | Loops, conditionals, validation gates |
| Data Passing | Output returned at the end | Each block can pass data to subsequent blocks |
| Composition | Single AI agent execution | Combine navigation, extraction, files, notifications |
| File Operations | Download files during task | Download, parse, upload, email files across blocks |
| Best For | Prototyping, simple extractions, one-offs | Production automations, bulk processing, complex logic |
| Run ID Format | tsk_* | wr_* |
Workflow structure
A workflow is defined as an ordered list of blocks. Blocks execute one after another, and each block can access the outputs of previous blocks. Here’s an IRS EIN registration workflow that fills out a government form, validates the summary, extracts the result, downloads the confirmation letter, and emails it to your team:- Navigation takes the company information from
ein_infoand fills out the multi-page SS-4 form until it reaches the review page - Validation checks that the form summary matches the provided information and either continues (if correct) or terminates the workflow (if incorrect)
- Extraction pulls the assigned EIN number and legal name from the confirmation page into structured JSON output
- File Download navigates to and downloads the EIN confirmation letter as a PDF file
- Send Email attaches the downloaded PDF and sends it to the specified recipients with company details in the email body
For detailed documentation on all available block types and their parameters, see Workflow Blocks Reference.
Step 1: Understand the structure
A workflow definition has two parts: parameters (the inputs) and blocks (the steps). Here’s the complete shape:Step 2: Define parameters
Theparameters array (inside workflow_definition) defines the inputs your workflow accepts. Instead of hardcoding a resume URL or job page into the workflow definition, you define named inputs that accept different values each time the workflow runs.
Each parameter needs three fields:
key— the name you reference later with{{ key }}parameter_type— always"workflow"for input parametersworkflow_parameter_type— the data type (string,file_url,json, etc.)
resume file and a job_url string. When you run the workflow later, you pass actual values for these parameters.
Available parameter types:
| Type | Description | Example value |
|---|---|---|
string | Text | "John Smith" |
integer | Whole number | 42 |
float | Decimal number | 99.99 |
boolean | True or false | true |
json | JSON object or array | {"key": "value"} |
file_url | URL to a file | "https://example.com/resume.pdf" |
credential_id | Reference to a stored credential | "cred_abc123" |
Step 3: Define blocks
Theblocks array (inside workflow_definition) defines the steps your workflow executes. Each block has a block_type that determines what it does: navigate a page, extract data, download a file, send an email.
Every block needs two fields: a label (a unique name) and a block_type. The remaining fields depend on the block type.
parse_resume) parses the resume file passed as an input parameter. The second block (apply_to_job) navigates to the job page and fills out the application.
Notice {{ resume }} and {{ job_url }} — double curly braces reference the input parameters you defined in Step 2. Skyvern replaces these with actual values when the workflow runs.
Skyvern supports 23 block types: navigation, extraction, validation, file download, for loops, conditionals, and more. See Workflow Blocks Reference for the full list.
Step 4: Pass data between blocks
When a block completes, its output becomes available to subsequent blocks. This is how you chain steps together: one block extracts data, the next block uses it. Reference a block’s output with{{ label_output }} — the block’s label followed by _output. Access nested fields with dot notation: {{ parse_resume_output.name }}.
Here, the apply_to_job block uses specific fields from the parse_resume block’s output:
{{ parse_resume_output.name }}, {{ parse_resume_output.email }}, and {{ parse_resume_output.work_experience }} are fields from the structured data the parse_resume block extracted from the PDF.
Looping over output data
When a block produces a list, use afor_loop block to process each item. Set loop_over_parameter_key to the output field containing the array, and reference the current item with {{ loop_block_label.current_value }}.
for_loop iterates over the order_ids array from the extraction block. Inside the loop, {{ download_invoice.current_value }} contains one order ID per iteration.
Step 5: Create the workflow
Send the complete workflow definition to the API. Skyvern validates the parameters, blocks, and template references, then returns aworkflow_permanent_id you use to run the workflow.
The API accepts two formats: pass a JSON object via json_definition, or pass a YAML string via yaml_definition.
Using JSON
Using YAML
Pass the same definition as a YAML string viayaml_definition. This is useful when you store workflow definitions in .yaml files.
workflow_permanent_id — you need it to run the workflow.
Step 6: Run the workflow
Pass values for the parameters you defined in Step 2. The call returns immediately with arun_id — the workflow runs asynchronously in the background.
run_id. Use this ID to check status and fetch results.
Step 7: Get results
Workflows run asynchronously, so you need to check back for results. You have two options: poll the API, or receive a webhook when the workflow completes.Option 1: Polling
Pollget_run until the status reaches a terminal state.
Option 2: Webhooks
Pass awebhook_url when running the workflow. Skyvern sends a POST request to your URL when the workflow reaches a terminal state.
Understand the response
The response from polling contains the workflow run status and output from each block.| Field | Type | Description |
|---|---|---|
run_id | string | Unique identifier for this run (format: wr_*) |
run_type | string | Always "workflow_run" for workflow runs |
status | string | Current status: created, queued, running, completed, failed, terminated, timed_out, canceled |
output | object | Output from each block, keyed by {label}_output |
screenshot_urls | array | Final screenshots from the last blocks |
recording_url | string | Video recording of the browser session |
failure_reason | string | null | Error description if the run failed |
downloaded_files | array | Files downloaded during the run |
created_at | datetime | When the run started |
modified_at | datetime | When the run was last updated |
Block outputs
Each block’s output appears in theoutput object with the key {label}_output. The structure depends on the block type:
Navigation/Action blocks:
Complete example
This script creates a job application workflow, runs it, and polls until completion. Copy and run it to get started.List your workflows
Retrieve all workflows in your organization.Next steps
Workflow Blocks Reference
Detailed documentation for all 23 block types
Workflow Parameters
Configure proxies, webhooks, and other run options
File Operations
Download, parse, and upload files in workflows
Schedule a Workflow
Run workflows automatically on a recurring cron schedule

