Skip to main content

Export and Import Workflows in Torq

Learn how to export and import workflows in YAML format.

Updated this week

You can seamlessly export workflows in YAML format for distribution or storage and import them into any Torq workspace as needed.

You can also share workflows across Torq workspaces to streamline collaboration.

Export a Workflow

In addition to the workflow itself, the export also includes the workflow description, tags, and section.

You can export a workflow using either of the following methods:

  • From the Workflows Page:

    1. Navigate to Build > Workflows.

    2. Locate the workflow you want to export and click its three-dot menu icon.

    3. Select Export to download the workflow's YAML file.

  • From the Workflow Designer:

    • Open the workflow in the Designer.

    • Click the three-dot menu in the top-right corner.

    • Select Export to download the workflow's YAML file.

Import a Workflow

To import a workflow into your workspace:

  1. Navigate to the Workflows Page: Go to Build > Workflows and click Import workflow in the top-right corner.

  2. Select the Workflow File: Browse your files and choose the YAML file for the workflow you want to import.

  3. Validate and Resolve Conflicts: Torq checks whether the workflow and any nested workflows are new to your workspace. If a conflict arises due to a workflow with the same name, choose one of the following options:

    • Keep original: Retain the existing workflows as they are.

      • The imported workflow will be added as a duplicate, while any nested workflows already present in the workspace will not be re-imported. Instead, the imported workflow will reference the existing versions.

    • Override original: Replace the existing workflows with the imported versions.

    • Duplicate: Create duplicates of any nested workflows and update the imported parent workflow to reference them.

  • You can automate workflow imports using the Import a workflow step, which defaults to the Keep original option for conflict handling. To change this, add the optional Conflict handling mode step parameter and select either Override original or Duplicate.

  • If included in the export, the workflow description, tags, and section are also imported. If the section doesn’t exist, it will be created.

Remediate import or export failures

Here’s how to address any issues that may occur during import or export:

For export failures:

  • If an export fails, try running the workflow using Run Workflow or Test Run to identify and fix potential issues.

  • Ensure the workflow completes successfully before attempting the export again.

For import failures:

  • Import errors are often caused by issues in the YAML file, such as manual edits introducing errors, circular dependencies in nested workflows, or references to non-existent workflows—ensure these are resolved for a successful import.

  • If needed, revert to a previously saved version or re-export the workflow.

Import and export workflows with custom steps

When exporting a workflow with custom steps, the associated custom steps and integrations are included in the export. Upon importing, these custom steps and integrations are automatically added to the receiving workspace, making them accessible in the workspace's step finder and integration configuration.

If a custom step or integration with the same version already exists in the workspace, it will not be duplicated. However, any updates or modifications to the step or integration will result in the addition of a new version.

Migrate all workflows to a different workspace

To migrate all workflows from one workspace to another without sharing the workflows:

  1. Download the workflow: Download the Migrate workflows to new workspace workflow below.

  2. Import the workflow: Navigate to Build > Workflows, click Import workflow, and select the workflow from your device.

  3. Configure the workflow parameters: Open the Workflow Parameters step.

    1. For Source account Torq integration, select the source workspace from which the workflows will be exported.

    2. For Destination account Torq integration, select the destination workspace into which the workflows will be imported.

Workflow templates

Did this answer your question?