shell
Executes a shell script with full shell interpreter support — conditionals, pipes, redirects, and loops.Script
The script to execute.
The script is passed to the interpreter with
-c, so it can be a single command or a multi-line script.
Shell
The interpreter to run the script with.Working Directory
You do not configure one. When the config has a workspace, the script runs pinned to that workspace’s root, so relative paths and any files the script creates stay inside it.A workspace that is not backed by the local filesystem has no directory to run in, and the
shell action is rejected for it.Output
{{ .step_id }} holds everything the script wrote, on both standard output and standard error.
Examples
Basic Script
List files in a directory:Run a Script File
Multi-line Script with bash
Script with Dynamic Values
Use workflow data in scripts (with caution):Chained Commands
Use pipes and shell operators:Process Script Output
Use the output in subsequent actions:Environment Variables
Security Considerations
Never directly interpolate user input into scripts. This can lead to command injection vulnerabilities.
Unsafe Pattern
Safer Pattern
Validate and sanitize input before use:download
Saves a file from the request or from an earlier action’s output to a path in the workspace.File
Which file to save. This is an object, not a template string: it names where the file comes from.
Steps that produce a file include
chromium/screenshot.
Destination Path
The directory to write the file into, relative to the workspace.File Name
The name to save the file as. Defaults to the file’s own name.Overwrite
Whether to replace a file that already exists at the destination.Output
{{ .step_id }} holds the path the file was written to, relative to the workspace.
Example
Save a file uploaded in thereport form field, then process it:
Common Use Cases
Next Steps
Key-Value Storage
Cache script results for reuse.
Transformation
Process script output with JavaScript.
Flow Control
Run multiple steps in parallel.
Actions Overview
Learn the fundamentals of ServFlow actions.