web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help with "When a file...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 34

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

Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!

  • jimmy-pa Profile Picture
    34 on at

    @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 Profile Picture
    34 on at

    @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 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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 Profile Picture
    34 on at

    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! 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard