cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Output SharePoint 365 list to CSV file using Flow: How can I add the file extension to the filename (.csv)?

I can pull only the list fields I need, put them into a file, attach to an email, and then send the email. But when I click on the eMail attachment it won't open in Excel. If I try to "Save As" and then open with Excel, it puts all columns into the "A" column on each row. But... if I add ".csv" when doing the "Save As" and double-click the saved file, it will open correctly in Excel.

 

I want to add the file extension .csv automatically in the Flow rather than have the user enter it manually at the "Save As".

 

Any ideas?

 

Bill

1 REPLY 1
Memorable Member
Memorable Member

Hi @wslayton , i see you in other thread 😄

 

First, thanks to open a new thread, this helps the community!

 

We have a trick to use dynamic content + expressions7

 

  1. Open the expression panel
  2. Type an 'a'
  3. Click in DynamicField panel
  4. Choose the DynamicField
  5. Remove the 'a' typed
  6. Use funcions with this field 
  7. Be happy Smiley Very Happy

 

To complete your quest you can use this expression in Attachament name:

 

 

concat(triggerBody()?['Title'],'.csv')

In this case I concat the Title of item that triggered Flow, (using in this sample SharePoint 'When an item was created' trigger)

 

 

Best Regards,

Gustavo Moraes

Community Super User
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. And give me a kudo to make me more happy!


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

Gustavo Moraes, o astronauta brasileiro do Flow!


Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,056)