cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jimmy-pa
Level: Powered On

Help with "When a file is created or modified (properties only)"

Hi all. 

 

I'm trying to build a simple Flow that will send me e-mail when a file is created or modified in a SharePoint site and library. 

 

The first step with Site Address, Library Name and Folder it's all good as well as with "Send an Email" settings.

 

What I don't know how to validate (how to construct / inform to Flow) when the a file was created or just modified because I want different e-mail messages templates (one for created and another for modified).

 

To do so, I'm trying to include a Condition, but to be honest I have no idea and it seems I'm doing a mess with this simple Flow (pardon me. I'm totally newbie). Could you help me to fix the Conditional part with an example as my picture below?

 

 Help_Flow.png

 

Thanks in advance and best!

Jimmy

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Help with "When a file is created or modified (properties only)"

Hi @jimmy-pa 

 

Please see the screenshot below: fgd.PNG

Expression: 

addMinutes(triggerBody()?['Created'],2)

Here, I am comparing the modified attribute and checking is it is 2 minutes greater than created time and if yes then the file is modified and if no the file is created. 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: Help with "When a file is created or modified (properties only)"

Hi @jimmy-pa 

 

Please see the screenshot below: fgd.PNG

Expression: 

addMinutes(triggerBody()?['Created'],2)

Here, I am comparing the modified attribute and checking is it is 2 minutes greater than created time and if yes then the file is modified and if no the file is created. 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

jimmy-pa
Level: Powered On

Re: Help with "When a file is created or modified (properties only)"

@yashag2255 first, thank you so much for your time and effort to help me! 

 

Later today (Brazil time now is 4:10pm) I'll test your suggestion and let you know about it. If it works, sure I'll mark your answer as solution!

 

Best,

Jimmy

jimmy-pa
Level: Powered On

Re: Help with "When a file is created or modified (properties only)"

@yashag2255. Sorry to delay this after my last reply 3 weeks ago! 

 

I've implemented your suggestion and now I can receive notifications when any file is modified (excellent Heart), but the "NO" part of Condition is not working... I tested including a new file, but I'm not receiving notification. Is there something else missing? Please see photo with updated Flow.

 

Not_Receiving_AddedFiles_Notifications.pngNotification for NEW FILES failing

Thank you so much once again! 

 

Jimmy

Dual Super User
Dual Super User

Re: Help with "When a file is created or modified (properties only)"

Hey @jimmy-pa 

 

No Worries! The flow looks righ to me. Can you please share a screenshot of a suucessful run where the condition was flse and the no branch was supposed to be executed?

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

jimmy-pa
Level: Powered On

Re: Help with "When a file is created or modified (properties only)"

Hi @yashag2255, I've tested again before confirm and now I think everything is ok. Please, see last picture.

 

Flow_OK.pngFlow's working

 

Thank you so much again! 🙂

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,403)