The Start block is the default trigger for workflows built in Pailot. It collects structured inputs and fans out to the rest of your graph for editor tests, API deployments, and chat experiences.
The Start block sits in the start slot when you create a workflow. Keep it there when you want the same entry point to serve editor runs, deploy-to-API requests, and chat sessions. Swap it with Webhook or Schedule triggers when you only need event-driven execution.
Fields exposed by Start
The Start block emits different data depending on the execution surface:
- Input Format fields — Every field you add becomes available as
<start.fieldName>. For example, acustomerIdfield shows up as<start.customerId>in downstream blocks and templates. - Chat-only fields — When the workflow runs from the chat side panel or a deployed chat experience, Pailot also provides
<start.input>(latest user message),<start.conversationId>(active session id), and<start.files>(chat attachments).
Keep Input Format fields scoped to the names you expect to reference later—those values are the only structured fields shared across editor, API, and chat runs.
Configure the Input Format
Use the Input Format sub-block to define the schema that applies across execution modes:
- Add a field for each value you want to collect.
- Choose a type (
string,number,boolean,object,array, orfiles). File fields accept uploads from chat and API callers. - Provide default values when you want the manual run modal to populate test data automatically. Structured defaults can also remain in deployed executions when runtime input does not override them; keep demo questions and shared test IDs empty.
- Reorder fields to control how they appear in the editor form.
Reference structured values downstream with expressions such as <start.customerId> depending on the block you connect.
How it behaves per entry point
When you click Run in the editor, the Start block renders the Input Format as a form. Default values make it easy to retest without retyping data. Submitting the form triggers the workflow immediately and the values become available on <start.fieldName> (for example <start.sampleField>).
File fields in the form upload directly into the corresponding
<start.fieldName>; use those values to feed downstream
tools or storage steps.
Deploying to API turns the Input Format into a JSON contract for clients. Each field becomes part of the request body, and Pailot coerces primitive types on ingestion. File fields expect objects that reference uploaded files; use the execution file upload endpoint before invoking the workflow.
API callers can include additional optional properties. They are preserved
inside <start.fieldName> outputs so you can experiment
without redeploying immediately.
In chat deployments the Start block binds to the active conversation. The latest message fills <start.input>, the session identifier is available at <start.conversationId>, and user attachments appear on <start.files>, alongside any Input Format fields scoped as <start.fieldName>.
If you launch chat with additional structured context (for example from an embed), it merges into the corresponding <start.fieldName> outputs, keeping downstream blocks consistent with API and manual runs.
Form deployments render the Input Format as a standalone, embeddable form page. Each field becomes a form input with appropriate UI controls—text inputs for strings, number inputs for numbers, toggle switches for booleans, and file upload zones for files.
When a user submits the form, values become available on <start.fieldName> just like other entry points. The workflow executes with trigger type form, and submitters see a customizable thank-you message upon completion.
Forms can be embedded via iframe or shared as direct links, making them ideal for surveys, contact forms, and data collection workflows.
Referencing Start data downstream
- Connect
<start.fieldName>directly into agents, tools, or functions that expect structured payloads. - Use templating syntax like
<start.sampleField>or<start.files[0].url>(chat only) in prompt fields. - Keep
<start.conversationId>handy when you need to group outputs, update conversation history, or call back into the chat API.
Best practices
- Treat the Start block as the single entry point when you want to support both API and chat callers.
- Prefer named Input Format fields over parsing raw JSON in downstream nodes; type coercion happens automatically.
- Add validation or routing immediately after Start if certain fields are required for your workflow to succeed.
Optional Start fields and conversation memory
Guidance version 1.0.0, verified 2026-11-01.
input, conversationId, and files are reserved. Use separate Input Format keys such as userQuestion and dialogId for manual tests. Chat supplies the current message and conversation ID; a manual/API execution may omit conversationId. The absence of a form field does not mean the chat field was deleted.
References such as <Start.conversationId> are resolved before JavaScript. A fallback inside pick(), ||, ??, or try/catch cannot catch a missing reference. Resolve the entire object with const start = <Start>; and inspect optional properties in JavaScript. Use the actual block name and do not quote the object reference.
Prefer start.input over start.userQuestion, and the real start.conversationId over an explicitly supplied test start.dialogId. Never use one constant fallback for all visitors. If both IDs are missing, fail clearly before accessing memory. Use a fresh UUID for each independent manual test conversation and reuse it only to continue that conversation. Keep demo defaults empty: structured defaults can survive in deployed executions when runtime input does not override them.
const start = <Start>;
const text = (value) => typeof value === 'string' ? value.trim() : '';
const userMessage = text(start.input) || text(start.userQuestion);
const conversationId = text(start.conversationId) || text(start.dialogId);
if (!userMessage) {
throw new Error('Передайте сообщение чата или userQuestion для ручного теста.');
}
if (!conversationId) {
throw new Error('Для ручного/API теста передайте уникальный dialogId. Для продолжения того же тестового диалога повторно используйте его; чат передаёт conversationId автоматически.');
}
return { userMessage, conversationId };Point all agent conversationId inputs at the normalizer result. Test manual input, both router branches, chat input precedence, repeated turns in one chat, and isolation of a second chat. An execution success flag alone does not verify memory correctness.