Parse CSV in Power Automate
How CSV parsing works in Power Automate, where the split-based method holds up, where it silently breaks, and when to keep the file as plain text.
Power Automate can read a CSV file easily, but turning that text into rows and columns a flow can loop over usually takes some assembly. This review covers what parsing changes, where the common no-code method works, where it fails, and when you should leave the file as plain text.
Is parsing CSV in Power Automate the right fit?
The common approach suits simple, predictable files that you control. Those files have a fixed column order, no commas or line breaks inside values, and consistent line endings. The main benefit is that each row becomes an item that later actions can use, such as creating a list item, updating a table or sending a message, without leaving the flow. The decisive tradeoff is that this method splits text on characters. It is not a real CSV parser and does not understand quoting rules, so a file with quoted fields can produce misaligned data without raising an error.
Plain text is the better choice if you only need to move, archive, attach or forward the file. Parsing adds risk there and gives nothing back. If the file comes from an outside source whose format you cannot control, consider an option that implements CSV quoting rules, such as an Office Script, custom code or a dedicated connector. Evaluate each of those separately, because no comparative test results were available for this review.
What parsing actually changes
To a flow, a CSV file is one long string. Parsing does not alter the characters stored in the file. It builds a new structure inside the flow run, usually an array of lines, with each line split into fields or mapped into an object with named properties. The source file stays unchanged unless you write output back to it.
The naming can mislead. The Data Operations group includes an action called Create CSV table, which converts an array of objects into CSV text, the opposite of parsing. Among the standard Data Operations, there has been no single matching action that reads CSV text into an array, which is why the split-based pattern below is widely used. Microsoft updates the action catalog over time, so check the current list before building a workaround.
The common split-based pattern
- Get the file content with the connector for the place the file is stored. Check the output in run history, because some actions return content that must be decoded to text first, for example with base64ToString().
- Remove carriage return characters so Windows-style line endings do not leave a stray character at the end of each line.
- Split the text into lines on the line feed character.
- Skip the header row with skip(), and filter out empty lines, since a trailing line break produces an empty final item.
- Use a Select action to split each line on commas and map fields by position.
Lines (Compose):
split(replace(<file text>, decodeUriComponent('%0D'), ''), decodeUriComponent('%0A'))
Rows (Filter array):
From: skip(outputs('Lines'), 1)
Condition: length(item()) is greater than 0
Records (Select):
From: body('Rows')
name: split(item(), ',')[0]
city: split(item(), ',')[1]
note: split(item(), ',')[2]
In this sketch, <file text> stands for the decoded file content, and the action names must match the names in your own flow. It shows the shape of the pattern and has not been tested as a working flow.
Checking an example against the mechanism
The pattern treats every comma as a delimiter, so it fails as soon as a value contains one. Take this input:
name,city,note
Ana,Austin,"Likes tea, not coffee"
Splitting the second line on commas gives four pieces instead of three:
[0] Ana
[1] Austin
[2] "Likes tea
[3] not coffee"
With the mapping above, the note field becomes "Likes tea with a leading quotation mark, and the rest of the value is dropped. The flow reports no error. A line break inside a quoted value is worse, because one record splits across two lines and every later field shifts.
Character encoding can also cause problems. Splitting on a comma does not break accented letters or emoji apart, since the split only happens at the delimiter. However, if the file is decoded with the wrong encoding, non-ASCII text can come out garbled. A byte-order mark at the start of the file can also attach itself to the first header name.
Will the data stay usable after it leaves the flow?
Parsed values are strings. Numbers and dates are not typed automatically, so convert them with expressions such as int(), float() or formatDateTime() before using them in comparisons or typed columns. Regional formats matter too. Some locales use a comma as the decimal separator, and spreadsheet software in those regions often exports with semicolons instead of commas. Confirm the delimiter before you hard-code one.
Unlike visual text styling, parsing does not affect reading order, screen readers or search in the usual sense. The usability question is whether the fields still line up when they reach their destination. If you write results back out as CSV with Create CSV table, or into Excel, SharePoint or another system, run a small test with your own data. Behavior in one destination is not evidence for another, and no destination-specific test results were available here.
Tradeoffs at a glance
| Approach | Handles quoted commas | Setup effort | Notes |
| Split expressions in Data Operations | No | Low | Works for simple, controlled files; misalignment happens without errors |
| Excel table with the Excel connector | Depends on how the CSV becomes a table | Moderate | Data must already sit in an Excel table, not a raw CSV file |
| Office Script or custom code | Possible, if the code implements quoting rules | Higher | Behavior depends entirely on the code you write or adopt |
| Third-party connector | Not verified here | Varies | Review licensing, limits and data handling with the vendor directly |
Before relying on a parsed CSV
- Test with rows that contain a comma inside quotes, a quotation mark, an accented character and an empty field.
- Compare the parsed row count with the row count in the source file.
- Check the first header name for stray invisible characters.
- Confirm the delimiter and line-ending style of files from each source system.
What this review could not confirm
- No flow runs were tested, and no performance, file-size or row-count limits are stated.
- Licensing requirements for premium or third-party connectors were not verified.
- The current Data Operations catalog may now include actions not described here.
- How Create CSV table quotes or escapes values containing commas was not tested.