> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.meetgail.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.meetgail.com/_mcp/server.

# Create CSV

> Turns a list of records into a spreadsheet file, with control over columns, headers, and which rows to include.

The Create CSV node takes a list of records and writes them out as a spreadsheet
file. You choose which columns to include, what to call them, and which rows make
the cut. The result is a `.csv` file later steps can email, upload, or hand off,
so a workflow can produce a ready-to-share export on its own.

## When to use it

* You want to hand someone a spreadsheet of results, like a list of renewals or
  contacts, at the end of a run.
* You need to reshape data from an earlier step into a clean file, keeping only
  the columns that matter and giving them friendly names.
* You are exporting records to a system that expects a CSV upload.

## Inputs

| Field          | What it's for                                                                | Example                            |
| -------------- | ---------------------------------------------------------------------------- | ---------------------------------- |
| Rows           | The list of records to write, one per row. Often comes from an earlier step. | A list of renewal records          |
| File Name      | The name to save the spreadsheet under.                                      | `renewals.csv`                     |
| Include Header | Whether to write a header row of column names. On by default.                | `On`                               |
| Fields         | Which pieces of each record to include, in the order you want the columns.   | `name`, `policy_number`, `premium` |
| Headers        | Friendly labels to show in the header row instead of the raw field names.    | `Name`, `Policy Number`, `Premium` |
| Filter         | A test applied to each record so only the rows you want are written.         | Keep only East-region records      |
| Skip Rows      | A number of rows to drop from the start before writing.                      | `1`                                |
| Max Rows       | The most rows to write.                                                      | `500`                              |

The list of records usually comes from an earlier step written as an
[expression](/platform/workflows/core-concepts/expressions/using-expressions-in-nodes), and the
filter is an expression too, so the file adapts to whatever the run produced.

## Outputs

| Field | What you get back                                                                                       |
| ----- | ------------------------------------------------------------------------------------------------------- |
| File  | A reference to the stored spreadsheet (its name, type, and size) that later steps can attach or upload. |

The node either produces the file or reports a problem, so you can route the run
if something goes wrong.

## Example

At the end of a nightly run, a workflow has gathered every policy up for renewal
in the next thirty days. A Create CSV node writes them to `renewals.csv`, keeping
just the policyholder name, policy number, and premium columns with friendly
headers, and drops any record whose premium is blank. A
[Send Email](/platform/workflows/node-reference/communication/send-email) step then sends
the finished file to the team at Chen Insurance Group.

![The Create CSV configuration panel, showing the rows source and file name fields.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/gail.docs.buildwithfern.com/bd0bf39149d107f4a1074a0c954f8bb521e98ebfe1df40183089a7fa45c057f2/docs/pages/platform/workflows/assets/files-and-documents-create-csv.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260823%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260823T232901Z&X-Amz-Expires=604800&X-Amz-Signature=ad5d87899251838b6427402de60f3973f2482330bd5e799cf234bf1499bfb1b1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

When you supply both Fields and Headers, they pair up by position and must have
the same count: the first field takes the first header label, and so on. If the
counts do not match, the node reports a problem, so double-check the two lists
line up before you rely on the output.

## Related nodes

#### [Parse CSV](/platform/workflows/node-reference/files-and-documents/parse-csv)

Read a spreadsheet file into rows instead of writing one.

#### [Create Text File](/platform/workflows/node-reference/files-and-documents/create-text-file)

Build a plain text or binary file from content you supply.

#### [Send Email](/platform/workflows/node-reference/communication/send-email)

Attach the spreadsheet to an outgoing email.

#### [For Each](/platform/workflows/node-reference/logic-and-flow/for-each)

Build the list of records step by step before writing the file.