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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / When a file is modifie...
Power Automate
Answered

When a file is modified in a SP library, send a unique notification 30 minutes later

(0) ShareShare
ReportReport
Posted on by 399
Hi,
 
So when i started creating the flow i was receiving multiple emails when it was being modified (specific excel). I only want 1 email. So decided to delay the notification but i cannot save it cause of this: 
The full flow looks like this. What should i change? The "condition 2" is above the "condition 1", but that shouldnt be a problem.
Categories:
  • Suggested answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at
    Can you move your Initialize variable 2 action above the condition 2 action? It is not allowed to nest a Initialize action within a condition (in your case the Condition 2 action).
  • Suggested answer
    abc 123 Profile Picture
    789 Moderator on at
    The Initialize Action can not be inside ANYTHING. 
     
    You're probably coming from a programming language where you init and use the variable at the same time, but Flow doesn't allow that. So, use Initialize Variable at the top of the Flow, then inside the Condition, Loop, Scope, Switch whatever structue... use the Set Variable action to assign it.
     
    Now, actually breaking down your code, the use of the Boolean Variable isn't needed, unless this is just an excerpt, and you use the variable more somewhere down the line.
  • Verified answer
    David_MA Profile Picture
    15,607 Super User 2026 Season 2 on at
    In addition to what others have posted, I see one issue with your condition. The ID in SharePoint would never be equal to the filename. The ID is always a unique number and is the primary key in all SharePoint lists and document libraries. If you want the flow to only run when that specific file is updated, add a trigger condition to the When an item or file is modified action. You would use @equals(triggerOutputs()?['body/ID'],100). Just replace 100 with the actual ID of the file. To determine this, add the ID column to one of your views.
     
    Next, if you don't want the flow to trigger multiple times within 30 minutes, you can add a second trigger condition to check that the current date/time is more than 30 minutes after the modified date/time. You would use @greaterOrEquals(addMinutes(utcNow(),-30), triggerOutputs()?['body/Modified']).
     
    Here is a blog post that explains trigger conditions: A simple way to create a trigger condition in Power Automate (tomriha.com)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard