Tray Platform / Moving Data / 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.
Select output field
Data path auto-entered
For further clarification, please see the gif below:
Go to Step feature
This feature gives you the ability to find out where the jsonpath you are using came from. Specifically which step in your workflow it is referring to.
Whether you are using a jsonpath as your property value or using a jasonpath to concatenate data simply select the jsonpath in question.
A number of menu options will appear. Among them will be the Go to Step feature. Once clicked it will automatically move the workflow to the origin step and open its property panel.
See the images in the accordion and the video below for more details.
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.