Text Block

Render text using Jinja templating

The Text block is designed to render text using Jinja templating within a Scout workflow. This functionality allows for dynamic text generation based on the workflow’s state, making it particularly useful for creating customized messages or documents.

Configuration (Required)

Text
codeRequired

The Text parameter is a required field where you define the string content that the block will render. This content can be referenced in subsequent blocks, allowing it to function as a variable throughout your workflow. The flexibility of Jinja templates within this input offers dynamic text generation and transformation capabilities, adapting to various workflow scenarios and requirements.

See Workflow Logic & State > State Management for details on using dynamic variables in this block.

Outputs

The output of the Text block is the rendered text based on the provided Jinja template and the workflow’s state. This allows for the creation of dynamic and contextually relevant content within your workflows.

Usage Context

Use this block to dynamically generate text by leveraging Jinja templates and the current workflow state. It is ideal for scenarios where text needs to be customized based on variable data inputs.

Best Practices

  • Ensure the text input is a valid Jinja template: Properly formatted templates ensure successful rendering and prevent errors.
  • Use state variables effectively to customize the output: Leverage the current state of the workflow to tailor the text output to specific needs.
  • Handle exceptions by verifying the correctness of the template and the availability of state variables: This ensures robustness and reliability in text generation.
Built with