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 content generation based on the workflow’s state, making it particularly useful for creating customized messages or documents.
Configuration (Required)
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.
Outputs
The output of the Text block is the rendered string based on the provided Jinja template. This allows for the creation of dynamic and contextually relevant content within your workflows.
Usage Context
Use this block to dynamically generate text within your workflow by leveraging Jinja templating. This is particularly useful for creating personalized messages or content that depends on the current state of the workflow.
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 usable in subsequent steps.
- Use the workflow’s state variables to dynamically populate the template: This allows for the creation of dynamic and adaptable text structures that can respond to changes in workflow state.
- Handle exceptions that may arise from rendering errors: Implement error handling to manage potential exceptions from template rendering, ensuring robust workflow execution.