Trigger a workflow with a file
- 09 Jun 2023
- 1 Minute to read
- DarkLight
Trigger a workflow with a file
- Updated on 09 Jun 2023
- 1 Minute to read
- DarkLight
Article Summary
Share feedback
Thanks for sharing your feedback!
When using an on-demand trigger, you can create a File field, which accepts files for input. Any file you upload will be accessible only in Torq steps by using a non-shareable link that will be available in the trigger event. The user executing the workflow will be required to upload a file when running the workflow from Torq or when using the trigger form URL. You can also easily trigger a nested workflow using a file.
Important
Only users' locally stored files can be uploaded to the file field.
How to use
- Create a new workflow with an On-Demand trigger or use one that already exists.
- Add a trigger input parameter.
- Select the File type and give the parameter a name. Specify whether the file is required or optional.
- Add at least one step to your workflow and click Test Run.
- Upload a file to use during the workflow execution.
- The file link is available in the trigger event. The link is non-shareable and can only be used in Torq steps.
- Use the file in the workflow steps. The file link is available at {{ $.event.<file parameter name> }}. To get the file content, use: {{ file $.event.<file parameter name> }}. The file inline function is required when accessing the file content since the link is non-shareable.
Trigger a nested workflow with a file
You can pass a file URL to a nested workflow that has a file type trigger parameter. The nested workflow can also return a file URL as an output.
IMPORTANT
Only non-shareable links that have the format tqfile://steps/XXXXXXXXX can be passed as trigger parameters.
Was this article helpful?