Using Files in Workflows
The files mechanism allows Workflows builders to create, edit and use files which are persisted between executions of steps in a Workflow. The lifespan of files is aligned with the lifespan of the execution of the Workflow - when the execution is finished, the files are deleted.
File object
Each file object contains 3 fields:
-
identifier
, which is the unique identifier of the file.- This field is used in various actions including upload file or send file via Slack.
-
size
, which is the size of the file in bytes. -
path
, which is the absolute path to the file:
Expression Language and Variable Picker Support
When creating the Workflow, the file objects are available in the variable picker under the files section.
-
To access the
File Identifier
,File Path
and theFile Size
, use the variable picker under the files -
Select
WorkingDirectory
under the file section of the Variable Picker.
- Then choose
WorkingDirectory|identifier
,WorkingDirectory|path
orWorkingDirectory|size
according to the respective inputs.
- Blink’s Expression Language supports accessing the file objects using the
get_file
function.
- It returns an object containing the 3 fields: the files
identifier
,path
andsize
Limitations
Each execution may create up to 100
files with a total size of 1500 MB
.
The maximum size for each file is 500 MB
.
Example Use Cases
-
Create a file using Bash/Python and upload it to a remote server.
-
Generate a Steampipe Report as a file and send it as an attachment in an email.
Was this page helpful?