Overview
The Form Node presents a structured form to the user, collects validated input across multiple fields, and writes the responses to the workflow context. Unlike the Question Node (which collects a single free-text response), the Form Node supports multiple typed fields with validation rules, making it ideal for gathering structured data like registration details, configuration options, or multi-field requests. When the workflow reaches a Form Node, execution pauses with anINTERRUPTED status until the user submits the form.
How It Works
Present Form
The workflow reaches the Form Node and emits a
form_requested SSE event containing the form definition. The chat interface renders the form fields.Submit and Validate
The user submits the form. Server-side validation checks all required fields and type constraints.
Configuration
The
config value must be a JSON object. If the config is provided as a JSON string, it is automatically parsed into an object before the node executes.| Parameter | Type | Default | Description |
|---|---|---|---|
title | string | "" | Form title displayed to the user |
description | string | "" | Optional description text below the title |
fields | array | — | List of form field definitions (required) |
output_variable | string | "form_data" | Context variable to store the submitted form data |
Field Types
Text
Single-line text input.| Property | Type | Description |
|---|---|---|
placeholder | string | Hint text shown when the field is empty |
min_length | number | Minimum character count |
max_length | number | Maximum character count |
pattern | string | Regex pattern for validation |
Textarea
Multi-line text input.Number
Numeric input with optional range constraints.Select
Dropdown selection from predefined options.Checkbox
Boolean toggle.Date
Date picker.Output Structure
When the user submits the form, the collected data is written to the workflow context as an object keyed by field names:{{form_data.project_name}}, {{form_data.priority}}, etc.
INTERRUPTED Status
When the Form Node executes, the workflow enters theINTERRUPTED status. This is a special state that indicates the workflow is waiting for external input (in this case, user form submission).
Key behaviors during INTERRUPTED status:
- The workflow engine preserves the full execution state
- No downstream nodes execute until the form is submitted
- The client receives the
form_requestedSSE event with the form definition - The workflow resumes automatically when the form submission is received
Standalone vs. Post-Start Usage
The Form Node can be placed in two positions:After Start Node (Common)
The user sends an initial message, the Start Node processes it, and then the Form Node collects additional structured details.As the First Interaction
The Form Node can also serve as the workflow’s initial interaction point, presenting a form immediately without requiring an initial message.Example: Support Ticket Intake
A workflow that collects ticket details before routing to the appropriate handler:{{ticket.category}} to route the request to the appropriate AI Agent or team.
Best Practices
Keep forms concise
Keep forms concise
Limit forms to 5-7 fields. If you need more information, consider splitting into multiple Form Nodes across the workflow, collecting data progressively.
Use appropriate field types
Use appropriate field types
Choose the most specific field type for each piece of data. A
select is better than a text field when options are known. A number field prevents non-numeric input at the client level.Provide sensible defaults
Provide sensible defaults
Pre-populate fields with reasonable default values to reduce user effort. This is especially important for optional fields.
Mark only essential fields as required
Mark only essential fields as required
Every required field adds friction. Mark a field as required only when the workflow truly cannot proceed without it.