The Output block is used in a Blend to provide external output.

An Output block is needed in following situations:

  • when a Blend is executed manually and the user needs to see certain output
  • when a Blend is executed via its REST API endpoint URL
  • when a Blend is called from another Blend

Please note that every block inside Blends has inputs and outputs, but these inputs and outputs are limited in scope to the current Blend. The Output block is the only block that can "share" data with the outside world.

Display mode

The Output block has a "Display mode" under Settings:

Following display modes are available:

  • Add this output to the list of outputs (default): you can have multiple output blocks in a Blend, and/or you can use an output block in a loop. Each output will be add to the overall output of the Blend.
  • Use only this output (overwrites previous outputs): the output of the block will replace all previous outputs.
  • Merge data with the existing output: output is concatenated into one output (string)

Show output to the user

You can combine plain text and field mappings in one Output block:

The output is displayed to the user, when the user runs the Blend. The output of the Blend is visible under the Tab "Output", during and after the execution of the Blend:

Using markdown

You can use markdown to format the output. Example to show a title and a table:

As you can see above, pipes "|" are used to separate columns.

This is the "Show title" output block:

This is the "Show table header" output block:

Please note that the this header is required to render the table correctly. The first line defines the column headers, the second line should have | --- | (pipe space 3x minus space pipe) for each column.

This is the result for the user:

Providing output in a REST API endpoint

When a Blend is called via its REST API endpoint URL (Webhook URL), the JSON response of the API call is defined by the Output block. Example:

Make sure to set the display mode to "Use only this output" if you don't want your JSON to be wrapped in an array (list).

If you use the default display mode "Add this output to the list of outputs", the output of the API endpoint of the Blend will be an array (list), where each item in the list is the JSON object of one output block.

Providing output in a Blend called from another Blend

When a Blend is called from another Blend, the Output block defines which data is returned to the calling Blend.

See also the remark above on using the correct display mode.

Did this answer your question?