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 / How to pick up only ne...
Power Automate
Answered

How to pick up only new files in one drive folder in power automate

(0) ShareShare
ReportReport
Posted on by 75

Hello, 

 

I am having a flow to read multiple files from folder in OneDrive and update the data in SharePoint.

But flow picks up the files which were already updated in SP every time it runs. (As expected ) 

 

Is there anyway to control the flow to pick up only the new files added or only the files modified recently in folder?  I know this is possible to do if my files are in Share Point Library with status column.

 

But not sure how I can do the same for the files in OneDrive folder.

 

Thanks

 

 

Categories:
I have the same question (0)
  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Hi,

     

    You can start the flow with the trigger "When a file is created" by Onedrive. So whenever a file is added to the folder, your flow will trigger only for that file. So this will pick up all new files added to onedrive..

    Then >

    You could copy this flow, and replace the trigger with the onedrive action "when a file is modified"

     

    Hope this helps.

     

    Good luck.

     

     

    Good luck.

  • Sivaperumal31 Profile Picture
    75 on at

    Hi @OkanAT , 

    Yes indeed, its helpful.

     

    But my flow is schedule to run every day at the end of business hours. In a day, there will be many files modified and new files created. So I do not want to clutter the flow as the flow will contain email alert step too . Hence I would need to run once a day.

     

    Thanks

     

    Thanks.

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    You can use the SharePoint connector Get files (properties only) since OneDrive is essentially SharePoint behind the scenes with regards to file storage. You can use any of the SharePoint connectors for OneDrive.

     

    grantjenkins_0-1677768385046.png

     

    For Site Address you will need to paste your OneDrive URL as a Custom value.

     

    For your Library Name you will need to type Documents as a Custom value (Documents is your My files).

     

    For Limit Entries to Folder, you can navigate to your OneDrive folder.

     

    For Include Nested Items, select Yes.

     

    For Filter Query paste in the following expression.

    //FSObjType eq 0 means only return files (not folders)
    
    //The Modified part will return files that were modified in the last 24 hours only
    
    FSObjType eq 0 and Modified gt '@{addDays(utcNow(), -1)}'

    .

    You can then loop over each of the files, or create an HTML table to send via email, etc.


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • Sivaperumal31 Profile Picture
    75 on at

    HI @grantjenkins , 

     

    Thank you , It worked to pick up the latest files modified in last 24 hours.

    But I am unable to assign the content of excel file to share point item list inside the loop , Properties from "List rows present in table" are not visible to map in "Create Item" List.

     

    Sivaperumal31_0-1678069896079.png

     

    But when I used "List files in Folder" from one drive instead of " Get files Property"  this problem is not there.(As below )

     

    Sivaperumal31_1-1678070204789.png

     

    Update : I managed to figure out how to get current item with simple expression for each column when creating the item in share point list like below . But i really wonder how it works with one drive but not using Get file property. 

     

    Sivaperumal31_0-1678077645167.png

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 604

#2
Valantis Profile Picture

Valantis 502

#3
Vish WR Profile Picture

Vish WR 417

Last 30 days Overall leaderboard