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?
Thanks in advance and best!
Jimmy
Solved! Go to Solution.
Hi @jimmy-pa
Please see the screenshot below:
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!
Hi @jimmy-pa
Please see the screenshot below:
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 ), 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 failing
Thank you so much once again!
Jimmy
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 working
Thank you so much again! 🙂
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
30 | |
29 | |
28 | |
20 | |
11 |