Reference documentation

Relay types

Relay's workflow dialect uses YAML "tag" notation, indicated by a !, to identify custom data types that the Relay service associates with code that it should run the workflow is executing. This allows workflows to have dynamic values, instead of hard coding everything directly in the YAML. There are several top-level types described here, plus a set of data-manipulation functions accessed as !Fn.<function> which are documented in the function reference.


Most actions require some form of authentication. !Connection provides a way to add service credentials to the workflow that are required by a Relay action. Actions that require a !Connection in order to run can be configured as follows:

- name: describe-instances
  image: projectnebula/ec2-describe-instances
      connection: !Connection { type: aws, name: my-aws-account  }
      region: !Parameter region

Then, add the required credentials for the Connection (in the example: my-aws-account) in the Setup sidebar.

Connections can be reused across Workflows. Referencing the same !Connection by name in another workflow will automatically use the defined connection.


Use this to indicate the value is a named secret that's stored on the service. The value needs to exactly match the secret name. If the secret doesn't exist, the workflow will not run. Secrets are scoped to a single workflow.

The most common usage for !Secret is in the spec for a given step, to indicate the value needs to be looked up from the secret store:

  - name: use-a-secret
    image: projectnebula/core
      secretpass: !Secret password

See the section on adding and managing secrets for more detail on secrets in Relay.


Similar to !Secret, !Parameter is most useful in a step's spec to indicate the value needs to be provided by the user or trigger that initiates the workflow. The name of the parameter needs to match one given in the parameters section of the workflow; the field you assign it to in the spec, however, can be anything.

    description: A parameter the user needs to provide
    default: "A silly default value"
  - name: use-a-parameter
    image: projectnebula/core
      userparam: !Parameter myparameter

For more information on parameters, see Passing data into workflow steps.


Use the !Output type to indicate the value is provided by a previous step. Outputs must include the step name for the step from which you're collecting the output, and the name of the output. To produce the output, use the ni tool in the originating step.

Using the !Output type in a step creates an ordering dependency; Relay will realize it needs to run the step that produces the value before the one that consumes it.

Here's a simple example that runs the date program to get the current date and time, then uses that value in the following step:

  - name: make-output
    image: projectnebula/core
    input: ni output set --key dynamicdate --value "$(/bin/date)"
  - name: use-output
    image: projectnebula/core
      mydate: !Output[make-output, dynamicdate]

For more information on outputs, see Passing data into workflow steps.


!Fn is short for "function". It is a special data type that indicates to the Relay service that it should run custom code (the function) with in order to produce the result. Functions allow you to manipulate data between steps and are also, when used as the value for a when keyword, the way Relay implements conditional execution. The general form of using functions is:

  - name: use-a-function
    image: projectnebula/core
      concatenation: !Fn.concat["a value", "a second value"]

See the Relay function reference for the full list of functions and their usage.


!Answer is an internal type that Relay uses to implement Approval steps.


!Data is a type that's only valid in the context of a Trigger section of a workflow. It allows you to extract the contents of a field from an incoming event payload for use in your workflow.