Pass a value to the next block
Build a two-block workflow where block 2 reads a value that block 1 published. Time: 10 minutes. Needs: Python 3.
Steps
- Create a new workflow and paste this into the YAML tab:
- Switch to Editor. Each card shows
steps.<id>near its lower edge. - Select Greet and open Properties → Input. Available data lists
steps.make_name.namewith a string pill. - Click Save, then Run.
What happened
make_nameprinted{"name": "Ada"}as its last line. Becausenameis declared inoutputs, Termorq published it assteps.make_name.name.greetlistedsteps.make_name.nameunderuses. Termorq wrote a temporary JSON file containing only that value, keeping its nesting:TERMORQ_INPUTholds the path to that file, not the JSON itself.
Code bodies are not template-expanded. Writing {{ steps.make_name.name }} inside Python source doesn’t insert the value. Always use uses and read the input file.
Check your run
Greet → Output shows greeting: "Hello, Ada!". On the Runs tab, select the latest run: the Greet row shows the value passed through uses.
Add a third block, shout, that reads steps.greet.greeting and publishes it upper-cased as loud.