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 / How do I ensure that s...
Power Automate
Unanswered

How do I ensure that send email flow runs only once after meeting the trigger?

(1) ShareShare
ReportReport
Posted on by 13

Forgive me as I'm a power automate amateur. I recently set up a flow to automate an email to the assignee when the field was completed. 

How do I specify that the email should only be sent when the assignee field is initially completed? Now it seems to trigger the email anytime the form is modified so the assignee is receiving multiple emails. 

 

Really the only time I want for another email to be triggered is if the assignee changes. Help please.

 

Coletad_0-1674682746544.png

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Below is how I would build the flow. This is assuming your List is using the default versions with Major versions.

     

    This flow should cater for the following:

    • If you create a new item and don't add the Assignee, or you edit an existing item and either leave the Assignee blank, or remove the existing Assignee, then the flow won't run at all.
    • If you do have an Assignee, it will check to see if it's changed since the last flow run, and only continue if it has changed.

     

    For this example, I'm using the following list that has a column of type Person called Assignee and set to optional.

    grantjenkins_0-1674704050638.png

     

    Below is the full flow. I'll go into each of the actions.

    grantjenkins_10-1674705550730.png

     

    When an item is created or modified will trigger the flow.

    grantjenkins_2-1674704447736.png

     

    I've added a Trigger Condition to the trigger above so that it will only run if there is a value for Assignee (not empty). To add the Trigger Condition, go into Settings, then Add to add the condition. The expression used in this example is below which effectively says if the Assignee is not empty then run the flow.

     

    @equals(empty(triggerOutputs()?['body/Assignee']), false)

     

    grantjenkins_3-1674704670362.png

    grantjenkins_4-1674704679578.png

     

    Next, we use Get changes for an item or a file (properties only) to get the values prior to the current version of the item. This allows us to see what values have changed. In particular, we can check if the Assignee value was changed. We pass in the ID and Triger Window Start Token as shown below.

    grantjenkins_5-1674705248960.png

    grantjenkins_6-1674705280361.png

     

    Condition is then used to apply further checks. We only want to send the email if the Assignee was added when we created a new item, or it was changed from what it was previously. We don't want to send an email if it was the same as what it was before.

     

    We need two conditions here. One to cater for new items just created, and one for items that were modified. If either of these conditions are true (OR) then we send the email.

     

    The first condition checks if the current version is 1.0 which means it's a new item just created. The expression used here is below, which effectively converts the version number to a float so we can test to see if it's equal to 1.0.

     

    float(triggerOutputs()?['body/{VersionNumber}'])

     

     

    The second condition checks if the Assignee column has changed since the last time a flow ran for this item.

     

    Note that we use OR since we are looking to see if EITHER of the conditions are true.

     

    grantjenkins_8-1674705429780.png

     

    If the result of the Condition is true (at least one of the conditions evaluated to true) we go into the Yes branch and Send an email.

    grantjenkins_9-1674705521024.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • Coletad Profile Picture
    13 on at

    Thanks so much @grantjenkins . 

     

    I'm trying to reach for the stars here and add this one last thing and hoping you can guide me. 

     

    I have a column for status and essentially, when the field reflects "complete", I want to trigger and email to the requestor. Now, I think that I can reuse the previous flow you shared but where this gets tricky is that I need to be able to attach an excel file that is sent back to the requestor with the details of the estimate. Again, here- I want it so that one 1 email goes to this person, irrespective of whether the form is updated later.  Is that too confusing?

  • Coletad Profile Picture
    13 on at

    Coletad_2-1675089512378.png

     

    In condition I changed, has column updated to status but not sure about true so I changed is equal to "complete" hesitantly. Haven't touch the float is equal to 1.....

     

    I don't want to create work for you. You've already gone out of your way. If this is too complex, I understand. 

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