Referencing Action Outputs

Staff users can reference the output of certain actions in subsequent actions within a workflow.

It is recommended to review the Data Pipeline Overview first, as this page references topics and terminology from that page.

The Data Pipeline

Referencing Previous Data

All data on the data pipeline can be accessed from within the input top-level object. input is guaranteed to exist, and it is guaranteed to always be an object (input cannot be an array or a primitive type).

For example, if a data pipeline looks like this after running the IQA and HTTP actions:

{
	"myIqaData": [
		{
			 "ID": "12345",
			"Name": "Alice Smith"
		},
		/* ... */
	],
	"myHttpResponse": {
		"statusCode": 200,
		"headers": {
			"Server": [ "Apache" ],
			"Date": [ "Wed, 24 Jul 2024 20:25:07 GMT" ],
			"Content-Type": [ "text/html" ]
	},
	"body": {
		"success": true,
		"data": {
			"jobStatus": "OK",
			"recordsProcessed": 150,
			"errors": 0
			}
		}
	}
}

The following templates are valid in any subsequent actions, assuming that the expected data types are correct:

Template

Output

{{ input.myIqaData[0].ID }}

12345

{{ input.myHttpResponse.statusCode == 200 }}

true

{{ input.myHttpResponse.body.data.errors > 0 }}

false

{{ input.myHttpResponse.body.data.recordsProcessed }}

150

Some actions (such as the CSV and Delta Hashing actions) require arrays as input. For these actions, simply reference the array as a template. In the preceding example, to pass the myIqaData field into the CSV action, simply enter {{ input.myIqaData }} into the CSV action’s Input Array property.

Adding Data to the Pipeline

Some actions write new data to the data pipeline. These actions allow staff users to choose the top-level property name that will be written to. These fields are always decorated with { } to denote that this property will be written to the pipeline for subsequent actions.

If the output property name is myHttpResult, the data pipeline might look like this after this action completes:

{
	/* ... previous properties from other actions ... */
  
	"myHttpResult": {
		/* ... new data that this action has written ... */
	}
}

Warning! If an output property name is specified, and that property already exists on the data pipeline, then that property will be overwritten.