Skip to main content
Best answer

How do I move oldest "Last Modified" file between OneDrive folders daily?

  • August 11, 2023
  • 3 replies
  • 99 views

calebw02

Hello there. I am trying to figure out how to move a file from one folder in my onedrive to another at noon every day. I would like this file to be the file with the oldest “last date modified”. It seems this should be pretty straightforward forward but I cannot seem to figure out how to get zapier to choose the file based on the last modified date rather than the name.  Thanks!

Best answer by Troy Tessalone

Hi @calebw02 

Good question.

You’d likely have to use the OneDrive API: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_search?view=odsp-graph-online

Zap action: OneDrive - API Request

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • August 12, 2023

Hi @calebw02 

Good question.

You’d likely have to use the OneDrive API: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_search?view=odsp-graph-online

Zap action: OneDrive - API Request

 


calebw02
  • Author
  • Beginner
  • August 12, 2023

Gotcha. It looks like this is the best solution. Thanks!

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • August 16, 2023

Glad to see Troy was able to point you in the right direction here @calebw02! 🎉

Let us know if you run into any issues or questions in testing out that OneDrive API Request (Beta) action. We’re always here and happy to help! 🙂