Files
Files allow you to create, edit, and share data between steps in a workflow. Once a file is available as a file variable, subsequent steps can reference its identifier, path, or size. Files are available only during the current workflow execution. They are deleted when the execution ends.File Object
Each file variable contains a file object with three properties:
For instructions on passing a file path to a Python script, see Using a File in Python Code.
Expression Language and Variable Picker Support
You can reference files through the variable picker or Blink’s Expression Language.Using the Variable Picker
- Open the variable picker and expand the files section.
- Select the file variable you want to use. In the example below, the variable is named
WorkingDirectory.

- Choose the property required by the action: File Identifier, File Path, or File Size. For the example variable, these appear as
WorkingDirectory|identifier,WorkingDirectory|path, andWorkingDirectory|size.

Using Expressions
Use theget_file() function in Blink’s Expression Language to retrieve a file variable by name.
To access a specific property, add .identifier, .path, or .size to the expression:
WorkingDirectory with the name of the file variable you want to use.

identifier, path, and size, use:

Files Uploaded Through Input Parameters and Web Forms
When a workflow receives a file through a File input parameter or a Web Form trigger, the uploaded file is automatically available as a file variable for that execution. The file variable uses the field’s Parameter Name and contains the sameidentifier, path, and size properties described above. For example, if the field’s Parameter Name is report, use the following expressions:
You can also select the uploaded file and its properties under the files section of the variable picker.
Uploaded files are available only for the duration of the workflow execution and are deleted when it ends. To retain a file, send it to another system, such as cloud storage or a ticketing platform, before the execution finishes.
Optional File Fields
If a file field is not marked as Required, users can leave it empty. When no file is uploaded, no file variable is created for that field during the execution. Any step that tries to access the missing file, either through an expression such as{{get_file("report").path}} or through the variable picker, fails with the following error:
- If the workflow requires the file: Mark the file field as Required.
- If the file is optional: Add a condition so that steps referencing the file run only when a file was provided. This includes any step that retrieves the file’s path before passing it to another step.
Using a File in Python Code
The Run Python action does not evaluate expressions such as{{get_file("report").path}} or variables inserted from the variable picker inside its code block. These remain literal text in the script.
To access a file in Python, first resolve its path in a step that supports expressions, then retrieve that step’s output through the context object.
-
Output the file path in a preceding step. For example, add a Run Bash Script step with the following code:
This outputs the resolved file path without a trailing newline. Replace
reportwith the file field’s Parameter Name. -
Read the file in the Python step. If the preceding Bash step is
S1, use:ReplaceS1with the identifier of the step that outputs the file path. This example opens the file in binary mode and stores its contents indata.
When Is a Working Directory Needed?
A Working Directory preserves files and changes between workflow steps configured to use that directory. Whether you need one depends on how you use the file:-
You want to access an existing file variable: Files uploaded through input parameters or web forms, and files created by Download File From URL, are already available as file variables. Access their paths using
{{get_file("name").path}}, replacingnamewith the file variable’s name. You do not need a working directory or Set File Variable to access these files. - Your script creates a file that a later step needs: Add a Create Working Directory action, select that directory in the script step, and save the file there. Then use Set File Variable with the same Working Directory to make the file available as a file variable for subsequent steps.
- Your script processes an existing file and you need to preserve the result: Select a working directory in the script step and save the new or updated file there. Then use Set File Variable with the same working directory to make the result available to subsequent steps.
Limitations
The following limits apply to each workflow execution:
GiB stands for gibibytes.
Example Use Cases
- Download a file and send it via Slack.
- Create a file using Bash or Python and upload it to a remote server.
- Generate a Steampipe report and send it as an email attachment.