Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

CSV data corrupted in Sharepoint

I created a custom flow to take email attachments that have a certain CSV file, and download that ATTACHMENT to a sharepoint folder of ours. But when I open the CSV in sharepoint after the flow executes, the data in the CSV appears corrupted. Its different than the original data.


In the excel attachment screenshot is a before and after.


Also attached is the flow.Capture.JPGflow.JPG


Please advise. Thanks in advance.

Resident Rockstar
Resident Rockstar

Hi @flowperson

There is a template that does just that and you could enhance it ever so slightly to allow you "to take email attachments that have a certain CSV file"


There is more than one way you could enhance this template so below is 1 option that will keep the action to "Check From email address"Capture-059.png

 Or, probably the best method would be to follow the below steps to customise the out the box template.


1. Click Edit on template called "Save my email attachments to a SharePoint document library"

2. Expand the Yes Branch of "Condition"

3. Click Elipses (...) on "Check From email aaddress" and delete it.

You will be left with the followingCapture-060.png

4. In "If no", drag the apply to each from "If no" to "If yes"

5. Add the same enhancement as detailed above to check for a file name of your choice, The named CSV you mentioned. As below:Capture-061.png

 Complete Flow:Capture-062.png


If you found this helpful please mark as thumbs up.

If this is the solution, please mark as the solution.

Any other questions, just ask.

Thanks, Alan

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

Thank you @AlanPs1 for the detailed response. However, there is one problem I anticipate with it - the CSV file that is sent to us always has a different file name each day

The date is auto-affixed to the file name by the sender. For example, the file sent on Thursday was export-02072019.csv. The file send on Friday was export-02082019.csv

So can we set the csv file name to INCLUDE certain text instead of be EXACT file name?

Hi @flowperson

Yes you can ... the solution is the same with one subtle change.

Not file name "is equal to" but "contains" instead.


If you, the reader has found this post helpful, please help the community by clicking thumbs up.

If the above post has solved your problem, please click "Accept as Solution".

Any other questions, just ask.

Thanks, Alan

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

I tried that. In the Run History area, it says it ran successfully. However, the file was not saved to our sharepoint.
There's zero Errors or Warnings in the flow setup area.


Attached is a screenshot of my setup.  Please advise. sample-flow.jpg

Helpful resources

October Events

Mark Your Calendars

So many events happening this month - don't miss out!



Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,875)