The Template block

Template block

Use the Template block to enter large amounts of formatted text in your Flow. You can embed data blocks in the Template block and reference their data in the text as variables.

Input

variable - When this port receives data, it assigns it to a variable. You can then reference the variable in the text box with curly braces like this: {{variable_name}}. You can also embed data blocks here and assign their values to variables.

Variables created in Flows aren't available to post-response scripts or other features outside Postman Flows.

Output

Out - Sends the information entered in the text box.

Setup

Enter text in the text box. The Template block's output port will send the text as a string and retain its formatting. Reference the Template block's variables and embedded blocks with curly braces like this: {{variable_name}}.

To create a variable in the Template block, connect a block's output to the variable input port, or embed a block with the Add data blocks icon Add data blocks icon. Change an embedded block to a different data block by selecting the embedded block's icon and choosing a block from the dropdown list.

Example

To see the Template block in an example Flow, check out Flow Snippets: Template.

The Record and String blocks also enable you to add text to your Flows.

You can embed the following blocks in the Template block to include their data in the Template block's formatted text:

Last modified: 2024/08/23