web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get any .csv file avai...
Power Automate
Answered

Get any .csv file available in a SharePoint path.

(0) ShareShare
ReportReport
Posted on by 31

Hi,

 

I have a SharePoint location where new file will be saved everyday. The file name is different every time. I just want the Power Automate Cloud flow to get a csv file if it is available in that SharePoint location. How to do that?

 

Please help. Thanks

Categories:
I have the same question (0)
  • DryMouse555 Profile Picture
    31 on at

    Just to be clear. The flow should go to the SharePoint folder and get any csv file that is available in that folder. 

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @DryMouse555 ,

     

    Please try this

    vxiaochenmsft_0-1717636132818.png

    substringof('.csv',FileLeafRef)

     

    Best Regards,

    Wearsky

  • DryMouse555 Profile Picture
    31 on at

    Hi, After that step, I did a compose and selected "File name with Extension". I get the File name as output, how can I read the contents of this file?

    DryMouse555_0-1717636646342.png

    DryMouse555_1-1717636684016.png

     

     

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @DryMouse555 ,

     

    Please try to use get file content action.

    vxiaochenmsft_0-1717643332829.png

    string(outputs('Get_file_content')?['body'])
    vxiaochenmsft_1-1717643356221.png

     

    Best Regards,

    Wearsky

  • DryMouse555 Profile Picture
    31 on at

    Thanks a lot Wearsky,

     

    So, before I was giving the file name in the get file content and reading the csv file, modifying headers and rows and generating a csv output.

    Now, After I introduced for each method which has get file content and compose actions, I am not able to connect it with my old flow. Any suggestions?

    DryMouse555_0-1717644757642.png

     

  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @DryMouse555 ,

     

    I think you should put all actions (except for init variable) that process data in a loop 'For each'.

    Initialize variable should before the loop and you can use 'set variable' or append to variable in the loop.

     

    Best Regards,

    Wearsky

  • DryMouse555 Profile Picture
    31 on at

    Hi,

    I have kept the "get file content" and "compose" in a apply to each. The output  of compose is

      

    Now, I took another compose outside of look and gave first compose as input, and I am seeing this result.


     Updating Media

    My concern is, why did the output changed? and I want to get the first compose output as the second one. I hope that make sense.

     

    Thanks,

      

       

     

     

     

     

    DryMouse555_3-1717718657717.png

    DryMouse555_0-1717718333819.png

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @DryMouse555 ,

     

    Have a good day.

    This appears to be a new question. Please consider making a new post and describing it in detail.

     

    Best Regards,

    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard