Skip to main content
Updated Aug 11, 2026

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

FieldWhat it does
Formatpdf, docx, xlsx, csv, or md. Defaults to pdf
File NameThe base name for the file. The extension is added for you
MarkdownThe document's content, for pdf, docx, and md
SheetsThe rows to render, for xlsx and csv
PurposeOptional 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

ValueWhat it is
step(N).fileThe stored file, ready to attach to a message or save into a record
step(N).fileNameThe final file name, extension included
step(N).sizeThe file size in bytes
step(N).contentTypeThe file's MIME type
step(N).bucket, step(N).fullPathWhere the file is stored

Tips

  • Pass step(N).file straight 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 pdf to xlsx reveals 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.
On this page