Workflow blocks
Generate Text
Generate text using AI models
ai/generate-text — Generate text using AI models.
Where it appears
The Generate Text block lives in the AI group of the Workflow Builder.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
format | select | No | text | Use 'Structured JSON' when you need fields the model must populate. For pick-from-list cases, use the Classify block instead. Options: text, object. |
system | text (multi-line, supports references) | No | — | Who the model is and what rules always apply. Cached across runs by the model provider. The per-run task and data belong in 'Prompt'. |
prompt | text (multi-line, supports references) | Yes | — | The task and data for this execution. Per-run context belongs here (not in the system prompt). Use <StepName.field> to inject upstream values. |
outputPreset | select | No | none | Apply a canonical output contract for a downstream channel. Injects a system prompt prefix and cleans the model output (e.g. strips stray code fences). Options: none, zendesk-comment. |
files | text (multi-line, supports references) | No | — | Files for AI to analyze. Images for vision, audio for transcription, PDFs for documents, text files extracted into prompt. |
schema | JSON schema | No | — | Define the fields the model should populate. Add properties manually, paste an example, or import a JSON file. |
Inputs and outputs
Inputs are the configurable fields above. The block produces these outputs:
Outputs
Reference an output downstream with <Generate Text.field>.
| Name | Type | Description |
|---|---|---|
success | boolean | Whether generation succeeded |
text | string | Generated text (for text format) |
object | json | Generated object (for object format) |
enum | string | Selected enum value (for enum format) |
error | string | Error message if failed |
Example
A minimal configuration for this block:
{
"type": "ai/generate-text",
"config": {
"format": "text",
"prompt": "<PreviousStep.field>",
"outputPreset": "none"
}
}Limits and failure modes
- Required field (
prompt) must be set, or the block fails validation before it runs. - On failure the
erroroutput is populated; downstream blocks that reference other outputs may not receive values.