How to Use Expression Editor

1. Opening the Expression Editor

  • Access the Expression Editor for any node via its settings. Change the input field format to "expression" in the settings. Clicking the blue field will open the Expression Editor.

  • In the ChatGPT node within Messages, click the `#` symbol in the lower Message field. This will open the Expression Editor to retrieve data from other nodes.

2. Adding a Variable in the Expression Editor

  1. On the left, you’ll see a list of nodes, and on the right, an empty expression field.

  2. Click the required node in the list to see its output data.

  3. Variables can be multi-level structures, depending on the tool you are interacting with. For instance, the Whisper Diarisation tool that transcribes an audio file and splits it among speakers, displays a complex data structure. It’s first level includes fields like language and speaker count, followed by a collapsible array of segments containing timecodes, speaker info, speech text, and individual word objects.

  4. To add a variable, find it in the list and drag it to the expression field in the Expression Editor. Data is transferred in double curly brackets format, usually like: `{{context["Node ID"]["variable name"]}}`. For instance, to get the task from a start node: `{{context["7rwO-start"]["task"]}}`

Dragging complex structures into the Expression Editor will show all nested levels.

3. If the Required Variable is Not Listed:

  • Variables appear in the list only after the node is executed.

  • If you add a new field to a node, execute the node to update the fields list in the Expression Editor. The new field value will then be available in the list.

Last updated