Text Block

Render text using Jinja templates within Scout workflows

The Text block is designed to render text using Jinja templating within a Scout workflow. This functionality allows for dynamic content 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 content using Jinja templating based on 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 that the block functions correctly and that the output is as expected.
  • Verify that the state variables used in the template are available and correctly named: This helps prevent errors during template rendering.
  • Handle exceptions that may arise from rendering the template: Implement error handling to manage potential issues during the rendering process.
Built with