Generate Document
Use this action when a workflow needs to produce a file — a PDF, Word document, spreadsheet, CSV, or Markdown file — and save it to your company storage.
Best for
- Building a report or invoice and attaching it to a message
- Exporting records collected by earlier steps as a spreadsheet
- Saving a generated document into a record's file field
Main fields
| Field | What it does |
|---|---|
| Format | pdf, docx, xlsx, csv, or md. Defaults to pdf |
| File Name | The base name for the file. The extension is added for you |
| Markdown | The document's content, for pdf, docx, and md |
| Sheets | The rows to render, for xlsx and csv |
| Purpose | Optional label for what this step is for, shown in the logs |
Markdown and Sheets swap places automatically: the builder shows whichever one matches the format you picked.
Sheets takes a list of sheets, each with rows:
[{"name": "Orders", "rows": [["Date", "Customer"], ["2026-01-05", "Ana"]]}]
CSV uses the first sheet only.
What later steps can use
| Value | What it is |
|---|---|
step(N).file | The stored file, ready to attach to a message or save into a record |
step(N).fileName | The final file name, extension included |
step(N).size | The file size in bytes |
step(N).contentType | The file's MIME type |
step(N).bucket, step(N).fullPath | Where the file is stored |
Tips
- Pass
step(N).filestraight into a messaging action's file field to send the document you just made. - If you change Format and the step starts failing, check that you filled in the field the new format needs — switching from
pdftoxlsxreveals an empty Sheets field, and vice versa. - Documents are capped at 10 MB and count toward your storage usage.
- Spreadsheet cells are written as literal text, so a value starting with
=stays text and never becomes a live formula. - This action renders content you supply. For calculated spreadsheets or charts, use Execute code instead.