Reference data in the workflow

Applies to

Bridge by Smartsheet

There are a few locations where data gets stored in Bridge:

Reference data from the runtime

The runtime is where trigger data from an integration is stored. The reference for the runtime data is {{runtime}}.

There are a number of data pieces stored within the runtime you may want to reference. When you are referencing these items, you should specify the name of the individual item.

For example, if a sheet in Smartsheet is the trigger for a workflow, you'll most likely need to reference the ID of the row involved. The reference could look like this: {{runtime.event.rowId}}.

The exact structure and naming convention is different depending on the trigger and event type. 

To make sure you are using the right reference:

  1. In the Run Log, hover over a trigger object. 
  2. Select The Menu icon.
  3. In the list that appears, select Copy Data Reference.

Run Log

Reference data from a state

Referencing a state is most often done when data has been passed from a parent workflow. The format of the reference is {{states.state name.value}}.

If you want to reference data from a module below a state, the state still plays a part. In this case, the structure of the reference would be {{states.state name.integration or utility name.module name}}.

If a module can output multiple data values, add the path for this specific data in your data reference (similar to how you reference individual pieces of runtime data).

For example, the Smartsheet: Get Row module by default returns the data in the image below. 

To reference the value entered in the Address cell on the row, the reference would be:
{{states.GetRow.smartsheet.get_row.row.cells.Address.value}}.

Get Row Address Value in a State

Reference data from a child workflow

You can reference data from a child workflow within the parent workflow. To do that, your data reference could look like this:

  • states.{{state that runs the child}}.child.{{state in child}}.value.; or
  • states.{{state that runs the child}}.child.{{state in child}}.integration or utility.module.

Options for empty data references

When the next step of your workflow depends on a specific value, which may or may not exist, you can use vertical bars (||) to handle two scenarios.

For example, you want to use the value in a Smartsheet cell to determine which path of a junction the workflow goes down. But you can't be certain the cell will always contain a value. 

If the cell is empty, the workflow will be stopped when it gets to the junction. You can add vertical bars (||) at the end of your data reference to avoid this. If that value has data, the workflow will use the reference to the left of the bars. If data doesn’t exist in that cell, the workflow will use what is on the right of the bars.

Take a look at the two possible scenarios in this reference:
{{states.GetRow.smartsheet.get_row.row.cells.Address.value||116 George Street, Edinburgh, UK}}

  1. The workflow will first try to use the address from the row it got earlier: GetRow.smartsheet.get_row.row.cells.Address.value.
  2. However, if that cell is blank, it will then move on to use the address specified after the vertical bars: 116 George Street, Edinburgh, UK.

Tips in using vertical bars

You can use: 

  • another data reference after the vertical bars rather than a typed value, or
  • multiple vertical bars to handle several different possible scenarios.

Mix text and data references

In most modules, you can combine written text and data references. For example, if you are using the Mailgun integration to send emails, you can type out the parts of the email that should always be the same. Then you can use data references for the parts that might not always be the same, such as the name of the recipient.

If you built the weather workflow in the Start a Blank Workflow for US Weather Service article, you might have noticed that the URL used in the HTTP call to the US Weather Service contained two data references.