What are workflows?
Workflows are multi-step automation templates in Skyvern that chain together multiple operations into a reusable, parameterized process. While a single Task handles one goal on one page, a Workflow orchestrates an entire end-to-end process: logging in, navigating multiple pages, extracting data, downloading files, and sending notifications. You define a workflow once with blocks and parameters, then run it repeatedly with different input values each time.Workflows vs Tasks
Understanding when to use a workflow versus a task is critical for building effective automations.| 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_* |
When to use Tasks
- Quick prototyping: Testing if Skyvern can interact with a specific website
- Simple data extraction: Getting product prices, contact information, or table data from a single page
- One-off automations: Ad-hoc tasks that don’t need to be repeated with different inputs
- Single-page operations: Filling a form, clicking a button, or extracting data from one page
When to use Workflows
- Production automations: Processes that run regularly with different inputs
- Multi-step processes: Login → navigate → extract → download → notify
- Bulk operations: Processing lists of items (job applications, invoice downloads, form submissions)
- Complex logic: Conditional branching, validation gates, error handling
- File processing: Parse CSV/PDF inputs, download files, upload to storage, email attachments
- Data pipelines: Extract from multiple sources, transform data, send to webhooks or APIs
Workflow Architecture
A workflow consists of three core components:1. Parameters
Parameters are the inputs your workflow accepts. They make workflows reusable by allowing different values on each run.{{ company_name }}, {{ ein_info.tax_id }}, etc.
2. Blocks
Blocks are the individual steps that execute in sequence. Each block has a uniquelabel and a block_type that determines its function.
- Navigation & interaction:
navigation,action,login,goto_url - Data operations:
extraction,validation,text_prompt - Control flow:
for_loop,conditional,validation - File operations:
file_download,file_url_parser,upload_to_s3,print_page - Integrations:
http_request,send_email,human_interaction - Utilities:
code,wait
3. Context & Data Flow
Each block produces an output that becomes available to subsequent blocks. Reference block outputs using{{ label_output }}:
parse_resume block extracts structured data from a PDF, and the apply_to_job block uses that data to fill out a form.
Workflow Execution Model
Sequential Execution
By default, blocks execute in the order they’re defined:next_block_label:
Conditional Branching
Useconditional blocks to create branching logic:
Looping
Usefor_loop blocks to iterate over arrays:
for_loop executes the nested blocks once for each item in the array.
Error Handling
Control workflow behavior on block failure:next_loop_on_failure to skip to the next iteration on failure:
Finally Blocks
Designate a block to always execute when the workflow ends (success or failure):finally block executes regardless of whether the workflow completed, failed, terminated, or timed out (but not if explicitly canceled).
Workflow Lifecycle
1. Creation
Define the workflow structure and submit it to Skyvern:workflow_permanent_id is used to run the workflow.
2. Execution
Run the workflow with specific parameter values:3. Monitoring
Check status and retrieve results:Workflow State & Browser Sessions
Browser Context
By default, each block in a workflow uses a fresh browser context. Setpersist_browser_session: true to share cookies, login state, and local storage across all blocks:
Reusing Browser Sessions
Pass abrowser_session_id when running a workflow to continue from an existing browser state:
Browser Profiles
Usebrowser_profile_id to persist cookies and storage across multiple workflow runs:
Best Practices
1. Design for Reusability
Parameterize everything that might change:2. Use Descriptive Labels
Block labels become part of the output structure:3. Validate Critical Data
Usevalidation blocks to check assumptions:
4. Structure Complex Goals
Break complex navigation into clear steps:5. Handle Errors Gracefully
Usecontinue_on_failure and error_code_mapping for resilient workflows:
Next Steps
Creating Workflows
Learn how to create workflows via SDK, API, and UI
Workflow Blocks
Complete reference of all 23 workflow block types
Parameters & Context
Master parameter types and data flow between blocks
Running Workflows
Execute workflows and retrieve results