> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cassidyai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate text

> Generate text using an AI model with a custom prompt, optional structured output, and model settings.

Generate text using an AI model with a custom prompt. This is the most versatile action in Cassidy — use it to write content, answer questions, transform data, or any other text generation task.

<Note>
  This action generates text based only on your prompt and any variables you
  reference. It does not automatically access your [Knowledge
  Base](/knowledge-base/overview). To include Knowledge Base context, use
  [Generate Text with Agent](/reference/actions/generate-text-with-agent) or add
  a [Search Knowledge Base](/reference/actions/search-knowledge-base) action
  before this one.
</Note>

<Steps>
  <Step title="Add the action">
    In the Workflow builder, click **+** between blocks and select **Generate Text** from the action library.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-img-0.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=2825b540f1d6d0c8c6c97e811c69b7f6" alt="Action library with Generate Text selected" width="950" height="578" data-path="images/reference/generate-text-img-0.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-img-1.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=33a2da63fd78971f03a1868b49a5e2d4" alt="Add the action step" width="908" height="1366" data-path="images/reference/generate-text-img-1.png" />
    </Frame>
  </Step>

  <Step title="Write a prompt">
    Enter the text that guides the AI model. [Reference variables](/guides/prompt-engineering#workflow-prompts) from previous steps or the trigger using the **#** symbol to provide dynamic context.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-img-3.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=09475beb4e950245d7bd702d12d6794e" alt="Prompt field with variable references" width="610" height="613" data-path="images/reference/generate-text-img-3.png" />
    </Frame>
  </Step>

  <Step title="Select the AI model">
    Choose the model for this step. Each model has different strengths — select the one that best fits your task (writing, reasoning, analysis, etc.). See [Choose an AI model](/guides/choose-ai-model) for guidance.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-img-4.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=e96b7a4790c6e015b1936e4cab205a7c" alt="Model selector dropdown" width="890" height="204" data-path="images/reference/generate-text-img-4.png" />
    </Frame>
  </Step>

  <Step title="Configure Structured Output Fields (optional)">
    If you need the AI to return data in a specific format with defined fields, set up [structured outputs](/workflows/advanced/structured-output-fields). This gives you named fields with specific data types you can reference individually in later steps.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-img-5.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=9fe1f87998be2b25f563c9cdbb6aad55" alt="Structured Output Fields configuration" width="900" height="504" data-path="images/reference/generate-text-img-5.png" />
    </Frame>
  </Step>

  <Step title="Configure Conversation Memory (optional)">
    Enable [Conversation Memory](/workflows/advanced/conversation-memory) if you
    want the Workflow to retain conversation history and carry context across
    runs.
  </Step>

  <Step title="Add Connectors (optional)">
    Expand the **Connectors** section and click **+ Add Connector** to let this action query live data from your business tools — like looking up records in [HubSpot](/integrations/hubspot/overview), [Salesforce](/integrations/salesforce/overview), or [Airtable](/integrations/airtable/overview). The AI decides when to use a connector based on your prompt.

    <Frame>
      <img src="https://mintcdn.com/cassidy/RPk-aW2ZmzE0KYzC/images/workflows/generate-text-connector-section.png?fit=max&auto=format&n=RPk-aW2ZmzE0KYzC&q=85&s=64e1be10a4bc137010dbb284f6bac5dd" alt="Connectors section on the Generate Text action with HubSpot added" width="2032" height="1614" data-path="images/workflows/generate-text-connector-section.png" />
    </Frame>

    <Tip>Connectors on a Generate Text action work the same way as [Connectors on an Agent](/agents/connectors/overview) — the AI queries external systems in real time during execution.</Tip>
  </Step>

  <Step title="Enable Code Execution and File Creation (optional)">
    Expand **Code Execution & File Creation** and turn on the setting when the
    action should process file attachments, generate charts, create reports, or
    edit files by writing and executing code. See [Analyze data in
    Workflows](/workflows/advanced/data-analysis) for a full walkthrough.
  </Step>

  <Step title="Add Capabilities (optional)">
    Expand the **Capabilities** section and click **+ Add Capability** to give
    this action additional skills like [Web
    Search](/agents/capabilities/web-search) or [Image
    Generation](/agents/capabilities/image-generation).
  </Step>

  <Step title="Adjust advanced model settings (optional)">
    Under **Advanced Model Settings**:

    * **Temperature** — Controls randomness. Lower values (e.g., 0.1) produce focused results; higher values (e.g., 1.0) produce more creative outputs. Default is 0.70.
    * **Include Citations** — Toggle to include Knowledge Base citations in the output.

    <Frame>
      <img src="https://mintcdn.com/cassidy/RPk-aW2ZmzE0KYzC/images/reference/generate-text-img-6.png?fit=max&auto=format&n=RPk-aW2ZmzE0KYzC&q=85&s=28fae605654733e78666abcd8bd1e30c" alt="Advanced Model Settings panel" width="1078" height="588" data-path="images/reference/generate-text-img-6.png" />
    </Frame>
  </Step>

  <Step title="Add examples (optional)">
    Under the **Sample Outputs** tab, provide examples to guide the AI toward a specific style or format.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-img-7.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=ad51bf47f6b406a14755dcba4412391a" alt="Sample Outputs tab with example entries" width="978" height="988" data-path="images/reference/generate-text-img-7.png" />
    </Frame>
  </Step>
</Steps>

## Related

* [Generate Text with Agent](/reference/actions/generate-text-with-agent)
* [Connectors overview](/agents/connectors/overview)
* [Capabilities overview](/agents/capabilities/overview)
* [Analyze data in Workflows](/workflows/advanced/data-analysis)
* [Structured Output Fields](/workflows/advanced/structured-output-fields)
* [Conversation Memory](/workflows/advanced/conversation-memory)
* [Choose an AI model](/guides/choose-ai-model)
