cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Dual Super User III
Dual Super User III

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
Highlighted
Dual Super User III
Dual Super User III

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

Highlighted
Regular Visitor

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

Highlighted
Regular Visitor

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.

 

Notification for NEW FILES failingNotification for NEW FILES failing

Thank you so much once again! 

 

Jimmy

Highlighted
Dual Super User III
Dual Super User III

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!

Highlighted
Regular Visitor

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's workingFlow's working

 

Thank you so much again! 🙂

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (4,075)