Skip to main content
All CollectionsBuild AutomationsWorkflows
Export and Import Workflows in Torq
Export and Import Workflows in Torq

Learn how to export and import workflows in YAML format.

Updated over 3 weeks ago

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.

Exporting a Workflow

There are two ways to export a workflow:

1. 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.

2. Directly from the Workflow Designer

  1. Open the workflow in the Designer.

  2. Click the three-dot menu icon in the top-right corner of the page.

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

Importing 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 also 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.

Handling Failures in Import and Export

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.

Importing and Exporting 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.

Did this answer your question?