Tray Platform / Moving Data / jsonpath shortcuts

jsonpath shortcuts

Using the connector snake

The quickest and simplest way of inserting the correct jsonpath is to use the Tray.io Connector Snake.

To use the Connector Snake, first find the input property you want to connect up. Then click and drag the circle to the left of the properties label. You can drag the end of the Connector Snake and connect it to the step you wish to use the output data from. You will be presented with a list of output properties to choose from and selecting one will map the output data you selected to the current input property.

Connector snake

Select output field

Data path auto-entered

For further clarification, please see the gif below:


Dynamic output schema

Every connector step has a Dynamic Output Schema which lists all of the data returned by that connector step, which can be accessed using jsonpaths.

This can be found by scrolling to the very bottom of the right-hand properties panel for any connector step.

The following example shows how you can use the dynamic output schema to get the jsonpath for the name of a repository owner, which has kicked off your workflow:


Manually setting the dynamic output schema

The connector snake is not always immediately available for all connector steps, and sometimes you might find that the Dynamic Output Schema is not very helpful.

While the Dynamic Output Schema may appear as image one displays, from the the debug output panel you know that there should be more options available to you, and that your connector has more data to give:

To fix this you can click on the Use Output button indicated below:

This will then update the Dynamic Output Schema, so that it displays all the data options available to you

The end result, when you compare the former Dynamic Output Schema with the latter, should display a notable difference:

This means it is now much easier to get at jsonpaths such as $.steps.slack-1.message.icons.emoji as it is available both via the connector-snake and automatically within the updated Dynamic Output Schema.