Skip to main content
All CollectionsBuild AutomationsVariables
Workspace Variables in Torq: Optimal Data Management
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 over a week ago

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.

The size limit of workspace variables is 4MB.

When to Use Workspace Variables

Workspace variables in Torq provide a robust solution for persistent storage, maintaining availability across all workflows within a workspace until explicitly deleted. These variables are easily accessible and manageable through the Workspace Variables page, offering a transparent and trackable method for reviewing and monitoring key data used in workflows.

Creating a New Workspace Variable

  1. Navigate to the Workspace Variables Tab: Navigate to Build > Workspace Variables.

  2. Initiate Variable Creation: Select 'Create Variable' to begin the setup.

  3. Define the Variable: Assign your variable a unique and meaningful name. Names can include spaces, numbers, hyphens, and letters, but avoid special characters. Choose wisely, as the name cannot be altered post-creation.

  4. Select the Variable Type: Depending on your need, you can choose from the following types: Text, JSON (objects, arrays, or any valid format), Boolean, or Number.

  5. Enter the Variable's Value: Input the desired data in the provided field.

  6. Save Your Settings: Confirm your entries and click 'Save' to store the variable.

Editing an Existing Workspace Variable

  1. Access the Workspace Variables Tab: Navigate to Build > Workspace Variables.

  2. Select the Variable to Edit: Identify and click on the variable you wish to modify.

  3. Update the Variable: Alter the value as necessary. You can update both the type and the content.

  4. Save the Changes: Confirm the changes are accurate, as previous variable versions won't be saved. Click Save to apply the updates.

Deleting a Workspace Variable

  1. Access the Workspace Variables Tab: Navigate to Build > Workspace Variables.

  2. Select the Variable to Delete: Identify and click on the variable you wish to delete.

  3. Initiate Deletion: Click the trash can icon next to the 'Save' button to remove the variable.

  4. Confirm Deletion: Confirm your intention in the popup dialog. Please note that this action is irreversible, so ensure accuracy.

Using Workspace Variables in Workflows

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

  2. Select the Variable: 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?