Building flows
Generate
Call an AI model as a step in a flow.
generate calls an AI model as one step in a flow. Use it to categorize an incoming event, draft a message, extract fields from free text, or decide which branch to take. The model's output becomes this node's output that later nodes read.
Spec
| Field | Meaning |
|---|---|
provider | Model provider: openai, anthropic, or google. Required. |
model | Model ID, such as gpt-4o-mini. Required. |
system | System prompt. |
prompt | User prompt. Supports {{...}} references to earlier outputs. |
messages | Chat messages, each { role, content } with role system, user, or assistant. Alternative to prompt. |
schema | JSON Schema requesting structured output. |
tools | Tool descriptors the model may call. |
toolChoice | Tool choice strategy: auto, required, or none. |
sampling | Optional controls: temperature, topP, topK, maxTokens, stopSequences, seed. |
Structured output
Pass a JSON Schema in schema to get typed output instead of free text. Later nodes reference its fields the same way they reference any output, so a downstream step can branch on {{categorize.category}}.
{
"slug": "categorize",
"type": "generate",
"spec": {
"provider": "openai",
"model": "gpt-4o-mini",
"prompt": "Categorize this ticket: {{trigger.body}}",
"schema": {
"type": "object",
"properties": { "category": { "type": "string" } }
}
},
"config": { "auth": ["openai_key"] }
}config.auth names the model provider credential to use. See Connecting integrations.
