StyloDocs
Workflow blocks

Generate Text

Generate text using AI models

View as Markdown

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

FieldTypeRequiredDefaultDescription
formatselectNotextUse 'Structured JSON' when you need fields the model must populate. For pick-from-list cases, use the Classify block instead. Options: text, object.
systemtext (multi-line, supports references)NoWho the model is and what rules always apply. Cached across runs by the model provider. The per-run task and data belong in 'Prompt'.
prompttext (multi-line, supports references)YesThe task and data for this execution. Per-run context belongs here (not in the system prompt). Use <StepName.field> to inject upstream values.
outputPresetselectNononeApply 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.
filestext (multi-line, supports references)NoFiles for AI to analyze. Images for vision, audio for transcription, PDFs for documents, text files extracted into prompt.
schemaJSON schemaNoDefine 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>.

NameTypeDescription
successbooleanWhether generation succeeded
textstringGenerated text (for text format)
objectjsonGenerated object (for object format)
enumstringSelected enum value (for enum format)
errorstringError 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 error output is populated; downstream blocks that reference other outputs may not receive values.

On this page