Skip to main content
All CollectionsBuild AutomationsOperators
Exit Operator: Configure Output Schemas in Torq
Exit Operator: Configure Output Schemas in Torq

Define output schemas in Torq to standardize workflow outputs, ensuring consistency, minimizing errors, and simplifying management.

Updated over 2 months ago

Output schemas make your workflows more predictable and easier to integrate with other systems or workflows. They ensure that everyone working with the workflow knows exactly what kind of data to expect, reducing errors and saving time.

This guide will show you how to set up and use output schemas, making your workflows easier to manage and reuse.

Setting Up an Output Schema

  1. Where to Add Parameters: Go to the Exit operator in your workflow. This is where you can add parameters to create your output schema. You can also switch the Exit operator to JSON mode if you need a raw JSON output.

  2. Adding Parameters:

    • Type: Decide what data your parameter will hold (e.g., Text, Number, Boolean, etc.). The default type is Short text.

    • Name: Give your parameter a name. This is how you'll refer to it in your workflow.

    • Description: Optionally, you can describe what the parameter is for.

  3. Consistency Across Exit Operators: Ensure all Exit operators in your workflow are updated with the right values in new parameters for consistency. Use the Event Preview tab to see how your data will look.

Parameters Default Values

  • Short/Long text: empty string

  • JSON: empty

  • Number: 0

  • Boolean: false

  • File: empty

Using Output Schema with Nested Workflows

You can reference the output schema of a nested workflow without running it. This allows you to design the parent workflow based on the output of the nested workflow.

Understanding JSON Mode

What is JSON Mode?: If your workflow needs a custom data structure, you can convert an Exit operator to JSON mode. This allows for a flexible raw JSON output.

How to Convert:

  1. Select the Convert to JSON option in the Exit operator's properties.

  2. The operator's icon will change to indicate it's now in JSON mode.

In JSON mode, you might need to adjust the parent workflow for various data outputs, as not all Exit operators follow a single structure.

Did this answer your question?