# Export records to a CSV or JSON file

> Use Export to CSV or Export to JSON in a workflow to turn records into a file, save it to a file field, email it or send it on.

Source: https://tadabase.com/docs/workflows/export-records-to-csv-or-json  
Status: Verified Nov 17, 2026. Checked against the current product

**Export to CSV** and **Export to JSON** turn records into a file while a workflow runs, for example a weekly CSV of finished jobs for your accountant. The file can be saved to a file field, attached to an email or passed to later steps.

## Export to CSV

1. **Add the action** Add a step, click **Add Action**, then under **Documents** choose **Export to CSV**.
2. **Choose the table** Under **Export from table**, pick the table.
3. **Filter and sort (optional)** Under **Filters**, set which records to include; only matching records go in the file. Under **Sort order**, set the row order.
4. **Choose the columns** Click **Auto-fill all fields** to add every field of the table, or **+ Add** to pick fields one at a time. Drag the cards to change the column order.
5. **Adjust each column (optional)** Open a column card to change its **Column title**. Date, number and currency columns have a **Format** (**Normal** or **Custom**) with options such as a date pattern, decimals and separators, and a **Preview**. File and image columns always contain the file's web address.
6. **Set the file options** Open **CSV Options** (see below).
7. **Choose where the file goes** Under **Output Settings**, pick a file field in **Save file to**, or leave **None (use action output only)** to only pass the file to later steps.

![The Export to CSV step in the side panel with a table, column cards and the CSV Options section](https://tadabase.com/docs-shots/workflows-export-csv-panel.webp)

| CSV Options | What it does |
| --- | --- |
| **File name** | The file's name. It can include tokens such as `{{date:Y-m-d}}`, `{{timestamp}}`, `{{table.name}}` or `{{user.email}}`; click the help icon for the full list. |
| **Delimiter** | **Comma ( , )**, **Semicolon ( ; )**, **Tab** or **Pipe ( \| )**. |
| **Line ending** | **CRLF (Windows / Excel)** or **LF (Unix)**. |
| **Include header row** | Puts the column titles in the first row. On by default. |
| **UTF-8 BOM** | Adds a byte-order mark so Excel opens accented and other non-English characters correctly. On by default. |

## Export to JSON

1. **Add the action** Add a step, click **Add Action**, then under **Documents** choose **Export to JSON**.
2. **Choose where the records come from** Under **Records from**, pick a table under **All Tables**, a connected table under **Connected Data**, the records of an earlier step under **Step Data**, or a JSON list from the trigger or an earlier step under **Trigger Array Data** or **Step Array Data**.
3. **Filter and sort (optional)** For a table or a list of connected records, set **Filters** and **Sort order**.
4. **Choose the values** Click **+ Add Column** for each value, or **Auto-fill All Columns**. In each card, pick the **Field** and type the **JSON key** it gets in the file.
5. **Set the file options** Under **JSON Options**, set the **File name** (the same tokens as CSV) and **Pretty print**, which indents the JSON so it is easy to read. Turn it off for the smallest file.
6. **Choose where the file goes** Under **Output Settings**, pick a file field in **Save file to**, or leave it on **None (use action output only)**.

## Use the file in later steps

- **Email it:** in a later **Send Email** step, click **Add Attachment** and pick the export step. See [Send an email from a workflow](https://tadabase.com/docs/workflows/communication-actions).
- **Link to it:** use the step's **CSV File URL** or **JSON File URL** as a value in a later step.
- **Use the JSON itself:** Export to JSON also passes on **JSON Text**, **Records (list)** and **Record Count**, so a later step, such as a [webhook](https://tadabase.com/docs/workflows/send-data-with-trigger-webhook) or a loop, can use the data without opening the file. This is skipped for files over 5 MB.
- **Check it:** a condition can test the step's **Status**, and for JSON also **Is Empty** and **Record Count**.

## Large exports

- An export holds at most 500,000 records. If more match, the file stops there and the step warns `Row cap of 500000 reached; output truncated.`
- Records are read and written in batches of 1,000, so large tables do not have to fit in memory at once.
- Export to CSV is made once per workflow run. When a run covers many records, the same file is used for each of them instead of being made again.
- Add filters so the file only holds what the reader needs. Smaller files are faster to make, send and open.
