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)NoFile URLs or an upstream attachment collection for AI analysis. Pass <Get Ticket Context.context.attachments> to analyze Zendesk attachments; secure downloads are authenticated automatically. Supports images, audio, PDFs, Word documents, and text files.
schemaJSON schemaNoDefine the fields the model should populate. Add properties manually, paste an example, or import a JSON file.
toolsdynamic-checkbox-listNoTools this step may call — knowledge search, managed APIs, and custom tool packs configured for your org. None are available unless selected.

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