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

Community site session details

Session Id : s3rnSEiRU3PAczedFihGkL
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 27 Feb 2023 08:04:23 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

 

 

  • Sivaperumal31 Profile Picture
    75 on 06 Mar 2023 at 02:40:33
    Re: How to pick up only new files in one drive folder in power automate

    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

     

     

  • Verified answer
    grantjenkins Profile Picture
    11,059 Moderator on 02 Mar 2023 at 14:51:32
    Re: How to pick up only new files in one drive folder in power automate

    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.

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on 27 Feb 2023 at 12:15:42
    Re: How to pick up only new files in one drive folder in power automate

    Does the next topic help you?

    https://powerusers.microsoft.com/t5/Building-Flows/Create-an-auto-email-at-the-end-of-the-day-a-sharepoint-file-is/td-p/1453795

     

    Good luck

  • Sivaperumal31 Profile Picture
    75 on 27 Feb 2023 at 11:36:40
    Re: How to pick up only new files in one drive folder in power automate

    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 27 Feb 2023 at 10:44:11
    Re: How to pick up only new files in one drive folder in power automate

    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.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete