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

# Slice CSV

> Breaks a spreadsheet too large to read at once into smaller pieces a workflow can process one at a time.

The Slice CSV node takes a large spreadsheet and divides it into a set of
smaller files, each small enough to read in one pass. It hands back the list of
pieces so a [For Each](/platform/workflows/node-reference/logic-and-flow/for-each) loop can
work through them one at a time, reading each with
[Parse CSV](/platform/workflows/node-reference/files-and-documents/parse-csv). It is the
answer to a file that is simply too big to process whole.

## When to use it

* A file has too many rows to read in a single step and you need to work through
  it in chunks.
* You are importing a large list and want to hand each piece to a step that
  accepts only so many records at a time.
* A recurring import can arrive at any size and you want it to process reliably
  whether it holds a hundred rows or tens of thousands.

## Inputs

| Field      | What it's for                                                                                                         | Example                                   |
| ---------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| File       | The large spreadsheet to divide, usually from an upload or an earlier step.                                           | The file uploaded at the start of the run |
| Has Header | Whether the first row is column names. When yes, the header is copied into every piece so each one stands on its own. | `Yes`                                     |
| Max Rows   | An optional cap on how many rows each piece may hold, when a later step needs pieces smaller than the automatic size. | `1000`                                    |

The file usually comes from an earlier step written as an
[expression](/platform/workflows/core-concepts/expressions/using-expressions-in-nodes).

## Outputs

| Field       | What you get back                                                               |
| ----------- | ------------------------------------------------------------------------------- |
| Slices      | The list of smaller files, in order. Loop over these to process the whole file. |
| Slice Count | How many pieces were produced.                                                  |
| Total Rows  | How many data rows were in the original file.                                   |

## Example

Chen Insurance Group runs a nightly import that can bring in anywhere from a few
hundred to twenty thousand contacts. A Slice CSV node divides the uploaded file
into pieces of at most a thousand rows each, capped so every piece is exactly one
bulk-import call. A [For Each](/platform/workflows/node-reference/logic-and-flow/for-each)
loop then reads each piece with
[Parse CSV](/platform/workflows/node-reference/files-and-documents/parse-csv) and adds its
contacts, so the same workflow handles a small file and a huge one the same way.

![The Slice CSV configuration panel, showing the file source, header setting, and max rows.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/gail.docs.buildwithfern.com/d7fed46819849a0997000d877ee8aa9e521ef9dad924b410b70534d1b3bc2e1d/docs/pages/platform/workflows/assets/files-and-documents-slice-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=20260823T232906Z&X-Amz-Expires=604800&X-Amz-Signature=546548d6f4e7e30b93f9148c99fe947f2ae558526bc82f208067fbd0c5a3cfc4&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

The Has Header setting here must match what you tell
[Parse CSV](/platform/workflows/node-reference/files-and-documents/parse-csv) inside the
loop. When you slice with a header, each piece carries its own copy of the
header row, so the parse step should also expect one. An empty or header-only
file is fine: it simply produces no pieces, and the loop does nothing.

## Related nodes

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

Read each piece into rows inside the loop.

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

Walk through the pieces one at a time.

#### [Conditional](/platform/workflows/node-reference/logic-and-flow/conditional)

Route the run when slicing reports a problem.

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

Write results back out to a spreadsheet.