> ## 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.

# Create files in Cassidy

> Generate documents, spreadsheets, and presentations through Agents, Workflows, and Chat.

Cassidy gives you three ways to create downloadable files — from quick one-off documents in [Chat](/guides/chatting-with-an-agent) to repeatable, branded deliverables in [Workflows](/workflows/overview). Choose the approach that fits your need.

## Choose your approach

<CardGroup cols={3}>
  <Card title="Chat + Agent" icon="comments" href="#create-files-in-chat">
    **Best for**: One-off files you want to iterate on in conversation — sales follow-ups, competitor one-pagers, summaries, draft decks.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-chat-example.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=602088f80b1bdba4e4f892f6c757eb12" alt="A PDF generated through an Agent chat conversation" width="2374" height="1308" data-path="images/guides/create-files-chat-example.png" />
    </Frame>
  </Card>

  <Card title="Workflow (template)" icon="file-powerpoint" href="#create-files-in-workflows-template-approach">
    **Best for**: Consistent formatting every time — brand-safe decks, proposals, client reports, onboarding packets. You design the template once, and the Workflow fills it with live data on every run.

    <Frame>
      <img src="https://mintcdn.com/cassidy/mzDBRDD-FW3Bbqp4/images/guides/create-files-workflow-template.png?fit=max&auto=format&n=mzDBRDD-FW3Bbqp4&q=85&s=0238c89c8b0bf834b2b53adc8acbcf0a" alt="A branded PowerPoint template being filled by a Workflow" width="1004" height="1094" data-path="images/guides/create-files-workflow-template.png" />
    </Frame>
  </Card>

  <Card title="Workflow (Code Execution & File Creation)" icon="chart-bar" href="#create-files-in-workflows-code-execution-file-creation">
    **Best for**: Output that varies too much for a strict template — charts, dynamic reports, and files that need AI-generated formatting. Also the approach to use when building reusable file-generation Workflows for [Call Workflow](/agents/call-workflow).
  </Card>
</CardGroup>

## Create files in Chat

The Chat interface lets you generate downloadable files — PDFs, Word documents, spreadsheets, presentations — directly in a conversation with an [Agent](/agents/overview). Describe what you need, and the Agent automatically uses [Code Execution & File Creation](/agents/advanced/code-execution-file-creation) to build and return a polished file.

<Info>The walkthrough below uses a competitor one-pager as an example, but the same flow works for any file type — reports, proposals, decks, spreadsheets, and more.</Info>

<Steps>
  <Step title="Start a new chat and select an Agent">
    Click **+ New Chat** and choose your Agent from the dropdown:

    * **Default Agents** (like Data Analyst) handle general file and data tasks but lack your business context
    * **Custom Agents** configured with your [Knowledge Base](/knowledge-base/overview) and domain-specific instructions produce outputs tailored to your organization. New custom Agents have [Code Execution & File Creation](/agents/advanced/code-execution-file-creation) enabled by default.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-default-agent.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=266836dd33201634c7dbd3feea4745e1" alt="Agent dropdown with the Data Analyst default Agent selected" width="1804" height="1070" data-path="images/guides/create-files-default-agent.png" />
    </Frame>

    <Tip>For custom Agents, attach reference files (like a branded template or battlecard) directly in the Agent's instructions so it uses them automatically whenever it creates a file.</Tip>

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-custom-agent.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=e169bc35a6b1dd0152f3a72a4dae9c76" alt="Custom Agent configuration with Knowledge Base and reference files attached" width="1530" height="494" data-path="images/guides/create-files-custom-agent.png" />
    </Frame>

    If Data Analysis is missing, edit the Agent and enable **Code Execution & File Creation** under **Customize** > **Advanced Settings**.

    <Frame>
      <img src="https://mintcdn.com/cassidy/AmLM8RqJQYmxK10C/images/agents/code-sandbox-advanced-settings.png?fit=max&auto=format&n=AmLM8RqJQYmxK10C&q=85&s=5562646de66cc7d239047b607994df49" alt="Agent Advanced Settings showing Code Execution and File Creation enabled" width="1024" height="646" data-path="images/agents/code-sandbox-advanced-settings.png" />
    </Frame>
  </Step>

  <Step title="Attach supporting files (optional)">
    Click the **+** button and select **Attach a File** or **Attach an Image** to upload supporting materials — call notes, spreadsheets, competitor docs, etc. This is helpful when using a default Agent that does not have reference files in its instructions.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-attach-menu.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=df97844aa97de024785599298859bef3" alt="Attachment menu with file and image upload options" width="524" height="592" data-path="images/guides/create-files-attach-menu.png" />
    </Frame>
  </Step>

  <Step title="Describe what you need">
    Type your request with as much detail as possible — format, audience, length, sections, and tone. For example:

    "I just wrapped up a prospect call and they mentioned MyCase as a competitor. Create a one-pager PDF I can send them about why we are better. Use our competitor battlecard template."

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-prompt.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=fb09d5a6a6eba2ba3a34e218ff082c88" alt="Chat message requesting a competitor one-pager PDF" width="1782" height="428" data-path="images/guides/create-files-prompt.png" />
    </Frame>

    The Agent automatically decides to use Code Execution & File Creation to produce the file — you do not need to tell it which setting to use.
  </Step>

  <Step title="Wait for the file to generate">
    The Agent gathers relevant context, then builds the file. Progress indicators appear as it works.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-generating.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=73ba9b688c57d3d387abe9dd0473e489" alt="Loading indicator showing the Agent generating a file" width="2174" height="156" data-path="images/guides/create-files-generating.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-previewing.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=9af7dae701738b0de40a3dd144b5b7b0" alt="Preview indicator showing a PDF being rendered" width="2184" height="582" data-path="images/guides/create-files-previewing.png" />
    </Frame>
  </Step>

  <Step title="Download and iterate">
    The finished file appears as a downloadable card at the bottom of the Agent's response. Click the download icon to save it.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-download.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=172091862b86059a8a5054ad2f5a1f23" alt="Downloadable file card with download icon" width="2242" height="324" data-path="images/guides/create-files-download.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-result-pdf.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=13af75e83ac0c006a5aa96732aaec870" alt="Generated PDF one-pager preview" width="2524" height="1286" data-path="images/guides/create-files-result-pdf.png" />
    </Frame>

    Continue the conversation to refine the output:

    * "Keep it to 1 page, skimmable, and non-combative"
    * "Add a 3-row comparison table: Feature / Competitor / Us"
    * "Write a short email to attach this one-pager to"
  </Step>
</Steps>

## Create files in Workflows (template approach)

For deliverables that need consistent formatting every time, use a [Workflow](/workflows/overview) with a template-based file creation action. Design the template once with placeholders, and the Workflow fills it with live data on every run.

### File creation actions

Cassidy offers several template-based actions you can add as Workflow steps:

| Action                                                     | Description                                                                |
| ---------------------------------------------------------- | -------------------------------------------------------------------------- |
| **Create Microsoft PowerPoint Presentation from Template** | Fill a branded PPTX template with dynamic content, loops, and conditionals |
| **Create Microsoft Word Document from Template**           | Populate a DOCX template with variables from previous Workflow steps       |
| **Create Microsoft Excel Spreadsheet**                     | Generate formatted XLSX files with structured data                         |

### Build a template-based file Workflow

<Info>This walkthrough uses a Quarterly Business Review (QBR) deck as an example, but the same pattern applies to proposals, onboarding packets, client reports, and more.</Info>

<Steps>
  <Step title="Set up the trigger and inputs">
    Create a [Workflow](/workflows/building) with a Manual Trigger (or a scheduled, webhook, or [email](/reference/triggers/email) trigger). Add input fields for the information your template needs — client name, date range, file uploads, etc.

    <Frame>
      <img src="https://mintcdn.com/cassidy/mzDBRDD-FW3Bbqp4/images/guides/create-files-wf-trigger.png?fit=max&auto=format&n=mzDBRDD-FW3Bbqp4&q=85&s=92008ff8000928d28674bac1867c3ba5" alt="Workflow trigger configuration with input fields for client name and date range" width="888" height="336" data-path="images/guides/create-files-wf-trigger.png" />
    </Frame>
  </Step>

  <Step title="Gather and shape the content">
    Add **Generate Text** or integration actions to look up account information, summarize objectives, analyze product usage, or pull relevant data. Each step returns structured data that subsequent steps can reference.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-wf-generate.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=c40cecdd8bebb998caa5cdc8f509c36e" alt="Workflow Generate Text action gathering content from integrations" width="974" height="2282" data-path="images/guides/create-files-wf-generate.png" />
    </Frame>
  </Step>

  <Step title="Generate structured outputs for the template">
    Use **Generate Text** actions with structured output fields to produce clean variables that map directly to your template placeholders — including arrays for loops and booleans for conditionals.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-wf-structured.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=bcc64ebdb3269eca9ef03096a67ff154" alt="Structured output fields producing variables for a template" width="1000" height="2190" data-path="images/guides/create-files-wf-structured.png" />
    </Frame>
  </Step>

  <Step title="Add a template action">
    Add the appropriate file creation action (e.g., **Create Microsoft PowerPoint Presentation from Template**). Upload your branded template, set an output name, and map your variables into the template fields.

    PowerPoint and Word templates support:

    * **Text placeholders**: `{variableName}` for dynamic content
    * **Conditionals**: `{#if:condition}` ... `{/if:condition}` to show or hide sections
    * **Loops**: `{#loop:arrayName}` ... `{/loop:arrayName}` to repeat content for lists
    * **Slide loops / slide conditionals**: `{%loop:arrayName}` and `{%if:conditionName}` to repeat or conditionally show entire slides

    <Frame>
      <img src="https://mintcdn.com/cassidy/mzDBRDD-FW3Bbqp4/images/guides/create-files-wf-template-action.png?fit=max&auto=format&n=mzDBRDD-FW3Bbqp4&q=85&s=76774f3a3ef8e81e2a928f121490be08" alt="Template action with uploaded PPTX template and variable mappings" width="2500" height="2204" data-path="images/guides/create-files-wf-template-action.png" />
    </Frame>
  </Step>

  <Step title="Run and download">
    Execute the Workflow. The generated file appears in the results panel. You can also pass it to a subsequent action — like **Send Email** — to deliver it automatically.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-wf-result-1.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=1fafe553b76ac7a7279ff9f7678c24c7" alt="Workflow results panel with generated PowerPoint file" width="1010" height="224" data-path="images/guides/create-files-wf-result-1.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-wf-result-2.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=5df551aa9d422361f7692b73ee325ae6" alt="Generated QBR deck preview showing branded template with filled data" width="2900" height="1658" data-path="images/guides/create-files-wf-result-2.png" />
    </Frame>
  </Step>
</Steps>

## Create files in Workflows (Code Execution & File Creation)

When the output varies too much for a fixed template — or you need the AI to generate charts, format documents, or manipulate files programmatically — enable **Code Execution & File Creation** on a Generate Text action. For a detailed end-to-end walkthrough, see [Analyze data in Workflows](/workflows/advanced/data-analysis).

<Steps>
  <Step title="Add a Generate Text action">
    Write a prompt describing the file you need. For example: "Using the analysis results and chart from the previous step, create a professional PowerPoint presentation with key findings and an executive summary."

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-da-prompt.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=310daf186b846525454a90a424cfe4e1" alt="Generate Text action with a prompt describing the desired file" width="1004" height="492" data-path="images/guides/create-files-da-prompt.png" />
    </Frame>
  </Step>

  <Step title="Enable Code Execution & File Creation">
    Expand **Code Execution & File Creation** and turn on the setting. This allows the AI to write and execute code to create, edit, or manipulate files.

    <Note>Screenshot needed: Generate Text action settings with Code Execution & File Creation enabled.</Note>
  </Step>

  <Step title="Reference inputs or previous outputs">
    Pass in files from the trigger (like an uploaded spreadsheet) or reference outputs from earlier steps so the AI has the data it needs.
  </Step>

  <Step title="Use the Generated Files output">
    When Code Execution & File Creation is enabled, the action produces a **Generated Files** variable containing any files created during processing. Reference this variable in subsequent steps or download the files from the results panel.

    <Frame>
      <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-da-output.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=98bbead21e179c941e83d85b6756ebfe" alt="Generated Files variable available for use in subsequent Workflow steps" width="1240" height="484" data-path="images/guides/create-files-da-output.png" />
    </Frame>
  </Step>

  <Step title="Chain multiple steps if needed">
    Use one Code Execution & File Creation step to analyze data and produce insights, then a second step to compile those insights into a formatted document or presentation.
  </Step>
</Steps>

<Tip>If you just need a quick, ad-hoc file and are not building a multi-step automation, use the Chat + Agent approach instead.</Tip>

## Advanced: attach a file-creation Workflow to Agents

You can build a Workflow whose job is to generate a specific type of file, then attach it to one or more [Agents](/agents/overview) using [Call Workflow](/agents/call-workflow). When a user asks the Agent for that deliverable, the Agent automatically runs the Workflow, collects required inputs through conversation, and returns the finished file.

This combines the convenience of Chat with the power of Workflows.

<Frame>
  <img src="https://mintcdn.com/cassidy/OAVjubuipH_KgkqL/images/guides/create-files-call-workflow.png?fit=max&auto=format&n=OAVjubuipH_KgkqL&q=85&s=1f2d0522e99d643c6af554c24bd895a1" alt="Call Workflow configuration attaching a file-generation Workflow to an Agent" width="1686" height="944" data-path="images/guides/create-files-call-workflow.png" />
</Frame>

For setup instructions, see [Call Workflow](/agents/call-workflow).

## Next steps

<CardGroup cols={2}>
  <Card title="Analyze data in Workflows" icon="chart-bar" href="/workflows/advanced/data-analysis">
    Full walkthrough of using Code Execution & File Creation in Workflows.
  </Card>

  <Card title="Analyze data with an Agent" icon="chart-mixed" href="/guides/analyze-data-with-agent">
    Learn how Agents use code execution and file creation to analyze data.
  </Card>

  <Card title="Building a Workflow" icon="diagram-project" href="/workflows/building">
    Create Workflows with template actions and structured outputs.
  </Card>

  <Card title="Call Workflow" icon="arrow-right-to-arc" href="/agents/call-workflow">
    Attach Workflows to Agents so users can generate files through chat.
  </Card>

  <Card title="Chatting with an Agent" icon="comments" href="/guides/chatting-with-an-agent">
    Master the Chat interface for quick file generation and more.
  </Card>
</CardGroup>
