Skip to main content

Workspace Variables in Torq: Optimal Data Management

Learn how to use workspace variables in Torq for streamlined storage and access to workspace-relevant information across workflows.

Updated this week

Use workspace variables in Torq to efficiently manage frequently used information, such as emails, IP addresses, or JSON settings, making it accessible across all workspace workflows. This guide offers detailed instructions on effectively managing and utilizing workspace variables to enhance efficiency and ensure seamless operations.

  • Workspace variables support up to 4 MB of data per variable, while Table workspace variables allow up to 50 MB for larger datasets.

  • Refer to the Table workspace variables guide for detailed configuration and usage information.

When to Use Workspace Variables

  • Store persistent data: Use workspace variables to maintain values across all workflows until explicitly deleted.

  • Centralize shared values: Manage commonly used data such as emails, IP addresses, tokens, or JSON settings in one place.

  • Ensure visibility and control: Monitor and review variables from the Workspace Variables page.

How to use

Create a new workspace variable

  1. (Optional) Create via workflow: Use the Create a workspace variable step inside a workflow.

  2. Open variables page: Navigate to Build > Workspace Variables.

  3. Start creation: Click + (Create Variable).

  4. Name the variable: Enter a unique, meaningful name using letters, numbers, spaces, or hyphens (no special characters). Note that the name cannot be changed later.

  5. Select type: Choose Text, JSON (object, array, or valid format), Boolean, Number, or Table.

  6. Enter value: Input the desired data.

  7. Save variable: Click Save to store the variable.

Edit an existing workspace variable

  1. (Optional) Update via workflow: Use the Update a workspace variable step inside a workflow.

  2. Open variables page: Navigate to Build > Workspace Variables.

  3. Select variable: Click the variable you want to modify.

  4. Update value or type: Modify the content or change the variable type as needed.

  5. Save changes: Click Save. Note that previous versions are not retained.

Delete a workspace variable

  1. (Optional) Delete via workflow: Use the Delete a workspace variable step inside a workflow.

  2. Open variables page: Navigate to Build > Workspace Variables.

  3. Select variable: Click the variable you want to remove.

  4. Delete variable: Click the trash icon next to the variable name.

  5. Confirm deletion: Approve the popup confirmation. This action is irreversible.

Use workspace variables in workflows

  1. Use workflow steps: Manage variables with the following steps:

    • Create a workspace variable

    • Delete a workspace variable

    • Get a workspace variable

    • List workspace variables

    • Update a workspace variable

  2. Integrate variables into workflows: Use workspace variables in your workflows as you would use any integration, secret, or metadata event. Within your workflow, click on the parameter you want to populate with a variable.

  3. Select the variable: In the autocomplete, scroll to Workspace Variables and choose the needed variable. Alternatively, directly type the variable name as {{ $.workspace_variables.VARIABLE_NAME }} to integrate it.

Did this answer your question?