Skip to main content

Trigger Workflow Executions with Uploaded Files

Learn how to trigger workflow executions using uploaded files as inputs.

Updated today

When using an on-demand trigger, you can add a file input parameter to allow users to upload files for the workflow. These files are only accessible within Torq steps through a non-shareable link provided in the trigger event.

You can also use Torq Interact to allow users to upload and download as many files as desired. Torq Interact can be used as a workflow trigger or used at any time within a workflow to communicate with end users.

How to use

  1. Create or select a workflow: Create a new workflow or select an existing one that uses an On-demand trigger.

  2. Add a trigger input parameter: Click + to add a new trigger input parameter.

  3. Configure the file parameter: Select the File type, enter a name, and set whether the parameter is required.

  4. Add a step and test the workflow: Add at least one step, then click Test Run in the top-right corner.

  5. Upload a file: Upload a file when prompted during the test run.

  6. Retrieve the file link: Find the file link in the trigger event context. This link is non-shareable and can only be used in Torq steps.

  7. Use the file in workflow steps: Reference the file using the trigger event file link available at:

    {{ $.event.<file parameter name> }}

    To retrieve 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.

    To put the file content into the workflow context, add an HTTP request step to the workflow and use the api_object key.

Trigger nested workflows with files

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.

Only non-shareable links that have the format tqfile://steps/XXXXXXXXX can be passed as trigger parameters.

Did this answer your question?