cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jimmy-pa
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
yashag2255
Dual Super User II
Dual Super User II

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
yashag2255
Dual Super User II
Dual Super User II

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!

@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

@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

yashag2255
Dual Super User II
Dual Super User II

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!

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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,345)