cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.

4 REPLIES 4
Highlighted
Resident Rockstar
Resident Rockstar

Re: CSV data corrupted in Sharepoint

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"

Capture-057.png

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!


Highlighted
Regular Visitor

Re: CSV data corrupted in Sharepoint

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?

Highlighted
Resident Rockstar
Resident Rockstar

Re: CSV data corrupted in Sharepoint

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!


Highlighted
Regular Visitor

Re: CSV data corrupted in Sharepoint

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

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (10,246)