cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DuarteMeneses
Frequent Visitor

OneDrive - File created vs modified

Hello everyone,

 

I've created 2 flows for a OneDrive shared folder:

  • A flow that sends an email notifying everyone that has access to the folder, when a file is modified;
  • A flow that sends an email notifying everyone that has access to the folder, when a file is created.

 

In each flow I've used the following OneDrive for Business trigger:

  • When a file is modified;
  • When a file is created.

 

When I edit a file, everything works as expected: only the "When a file is modified" trigger is activated.

My problem is when I add or create a new file to the folder, both triggers are activated.

 

My understanding is that the "When a file is modified" triggers works like it was "When a file is created (or modified)", and that would be ok if I could check if the file is new or just modified. How can I do that?

 

Thank you,

Duarte

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

To check if its a new file compare the Created and Modified Dates.  If they are the same then the file is New.  If they are different the file is being edited.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I thought about it but unfortunately I don't know how to get the Created Date. Another thought was checking the file version, but unfortunatelly I only get the following metadata:

 

DuarteMeneses_0-1641991858615.png

 

How can I get the Created Date or the File Version? Thank you

I just tried it and you are correct.  I'm not sure why the connector for SharePoint provides both Created and Modified, but OneDrive only does Modified.  



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,883)