← Al Davies, 250 High Street

How to create a CSV file in Power Automate

Add the Create CSV table action, set From to your array, then save its output with Create file. The action only makes CSV text. It does not make a file.

What does the Create CSV table action do?

Create CSV table is a Data Operation action. It takes an array, such as the Value output of Get items, and returns the rows as text. The first line holds the column names. Each next line holds one item.

The output is plain text. To get a .csv file, pass the output to a second action, such as Create file in SharePoint or OneDrive.

How do you set it up step by step?

  1. Add a Get items action for your SharePoint list.
  2. Add the Create CSV table action.
  3. In From, select the Value dynamic content from Get items.
  4. In Columns, keep Automatic or select Custom (next section).
  5. Add Create file. Set File Name to something like export.csv.
  6. In File Content, select the Output of Create CSV table.

How do you pick only some columns?

Set Columns to Custom. Enter a header in the left box. This is the column name in the file. Enter a value in the right box. Select dynamic content, or type an expression.

Custom columns also remove the extra SharePoint fields that Automatic adds, such as odata tags and ID fields. Many people use Custom for this reason alone.

For a person column, use the field's Email or DisplayName property. For example: item()?['Owner']?['Email'].

How do you reshape the data before you build the CSV?

Add a Select action before Create CSV table. Select maps each item to only the fields you want, with the names you want. Then use Automatic columns on the Select output.

To export only some rows, add a Filter array action first. To make the rows sorted, see sort an array.

Why does the CSV have only 100 rows?

Create CSV table writes every row it receives. The limit comes from Get items, which returns 100 items by default. Turn on Pagination in the Get items settings and set a threshold, or the CSV stops at 100. See Get items only returns 100.

How do you email the CSV instead of saving it?

In Send an email (V2), open Advanced options and add an attachment. Set Attachments Name to report.csv. Set Attachments Content to the Output of Create CSV table.

If a cell can contain a comma or a line break, test the file in Excel before you rely on it.

How do you fix a CSV that shows odd dates or characters?

Dates from SharePoint arrive in ISO format, such as 2026-11-05T05:00:00Z. Use Custom columns and wrap the value in formatDateTime(). Example: formatDateTime(item()?['DueDate'], 'yyyy-MM-dd'). See formatDateTime.

A null value can break an expression. Use coalesce() to supply a default, as in coalesce(item()?['Notes'], '').

Want help with a flow that builds reports?

I am Al Davies at 250 High Street LLC. I build SharePoint and Power Automate trackers remotely for small teams. The first call is free. You can see past work in the portfolio.

FAQ

Does Create CSV table make a file?

No. It returns text. Use Create file, or an email attachment, to make the file.

Can I change the header names?

Yes. Set Columns to Custom and type the header you want in the left box.

Can I use it with Excel data?

Yes. Any array works, including rows from List rows present in a table.

Sources