Input Block
Starting your workflow with defined inputs
The input block is the starting point for any workflow in Scout, enabling you to specify and manage the input fields that will be used throughout the workflow. Each workflow must begin with an input block to define the input fields required for running the workflow.
The input block allows you to create many input fields by clicking the ”+ Add an item” button at the bottom. Each input field can be referenced in subsequent blocks within the workflow, providing a flexible and dynamic approach to data handling.
The ID is a unique identifier for each input field and is required to distinguish between different inputs. This ID is used in other blocks to reference the specific input data.
For example, if you have a user_message
input field in the input block, this would be referenced as inputs.user_message
in any of the subsequent blocks in the workflow.
The display name is what appears on the workflow canvas, providing an easy-to-understand label for each input field. Choose names that clearly represent the data being inputted to ensure clarity and ease of use.
The input type determines the kind of data the field will accept. Options include:
- short_text: For brief text entries.
- long_text: For longer text entries.
- number: For numeric data inputs.
- checkbox: For boolean states.
- json_object: For structured JSON data.
The optional toggle determines whether the input is mandatory or not. Set this to true if the input can be omitted without affecting the workflow.
See Workflow Logic & State > State Management for details on referencing input fields within workflow logic.
Best Practices
- Clear Naming: Use descriptive names for display name attributes to ensure ease of understanding and reference throughout the workflow.
- Data Validation: Implement validation checks on inputs where applicable to ensure data integrity and prevent processing errors.
- Documentation: Maintain clear documentation on the purpose and expected values of each input field for users who may interact with the workflow.