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 / Send an email when a d...
Power Automate
Unanswered

Send an email when a duplicate value is found in a specific column

(0) ShareShare
ReportReport
Posted on by 114

Hi I've spent a long time trying to get this flow to work.

 

i want an email to be sent when a sharepoint list is updated, if there is a duplicate value in a specific column on the sharepoint list. (column : 'Account_x0020_number'). I want the email(s) to put the Title column and account number of the sharepoint list in the body of the email.

 

I've tried numerous ways of doing this, but nothing seems to work. another thing that complicates matters is there are null values in the column and ne null doesn't seem to work as a filter query for some reason. I suppose I need to do a filter array on this, but I can't get that to work either. 

 

Does anyone have any ideas on how to get this to work. 

 

Thanks,

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @BenBennett321 Have you considered toggling on Enforce unique values in your SP column. This will prevent duplicate values from being entered.

    creativeopinion_0-1706289388829.png

    You might be interested in this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows

     

    In this tutorial I cover:

     How to troubleshoot a false Condition action result

     How to get dynamic content when it isn’t selectable from the list of dynamic content

     How to troubleshoot an Apply to Each action that isn’t looping through

     How to troubleshoot a skipped Apply to Each action

     How to troubleshoot a Filter Query

     How to use a SharePoint yes/no column in a Filter Query

     How to use Compose actions to troubleshoot a Power Automate flow

    How to troubleshoot multiple emails being sent

     How to troubleshoot multiple Teams messages being sent

     

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response! 

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

  • BenBennett321 Profile Picture
    114 on at

    Hi Creative Opinion, thanks for that, but i only want to flag if there is a duplicate, I don't want to necessarily prevent them. I just need to do an additional check if there is a duplicate in that field. 

     

    Thanks, 

  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @BenBennett321 No worries. Tip: Remember to rename your actions to keep your flow organized!

    Trigger Condition (Optional)

    If you'd like to only trigger your flow when an item is modified—you can add a trigger condition to your flow. When a New Item is Created the Version is 1.0.

    creativeopinion_0-1706387119314.png

     

    You can use that to differentiate between when an item is created or when it's modified.

     

    To only trigger an item when it's modified, you'll need to compose an expression. First, add a Compose action to your flow and insert the Version number dynamic content from your flow trigger.

    creativeopinion_1-1706387149531.png

    Click on the three dots and select Peek Code.

    creativeopinion_2-1706387181432.png

    Copy the expression after the @ symbol and before the closing double quotes to your clipboard.

    creativeopinion_3-1706387219422.png

    Click on the three dots of the trigger conditions and select Settings

    creativeopinion_4-1706387248074.png

    Scroll down to the Trigger Conditions. You'll need to include an @ symbol at the start of a trigger condition expression. 

     

    First insert the not() function.

    creativeopinion_6-1706387316492.png

    In between the not() function insert the equals() function. 

    creativeopinion_7-1706387346824.png

    In between the equals() function paste the expression from your clipboard.

    creativeopinion_8-1706387370555.png

    Add a comma, then insert a 1.0 between single quotes. This expression will only trigger the flow if the version is not equal to 1.0 (aka the item was not just created).

    creativeopinion_9-1706387397348.png

    Run a test. First, create a new item in your SP list. The flow should not trigger. Then modify an existing item. The flow should trigger. 

    creativeopinion_10-1706387441167.png

    Get Changes for the SP Item

    Add a Get changes for an item or a file (properties only) action to your flow. In the ID field, insert the ID dynamic content from the flow trigger. In the Since field, insert the Trigger Window Start Token dynamic content from the flow trigger.

    creativeopinion_11-1706387716051.png

    You've indicated in your original post that you only want to send a notification a specific column has changed. To do this you'll need to check if the column has changed before continuing on with your flow. 

     

    For testing purposes while building the flow, add a Compose action to your flow. Insert the Has Column Changed: [Your Account Number Column] dynamic content. For my SP List, it's the Has Column Changed: Custom ID dynamic content. 

    creativeopinion_12-1706388022515.png

    Run a test. Make a change to the Account Number Column. Review the output of the Compose action. The Compose action should output true

    creativeopinion_13-1706388322343.png

    Condition Check

    Add a Condition action to your flow. Insert the output from the Compose action above into the first value field. This is why naming your actions is important. Especially when you have multiple instances of the same action. It makes it easy to identify which dynamic content belongs to which action. 

     

    Leave the operator to is equal to. Enter true into the second value field. 

    creativeopinion_14-1706388439298.png

     

    Add the rest of your actions into the YES branch. The flow will only perform those actions if the Account Number column has changed. If not, then nothing will happen.

    Send an Email (V2)

    Whenever you are building a flow that sends an Email or Teams message, always use your email address in the recipient field until you've confirmed your flow is working as expected. Once your flow is ready to go you can replace your email address with the email address of the actual recipient. 

    creativeopinion_15-1706388828924.png

    Personally, I like to insert the email address of the actual recipient into the Subject line or Email/Message Body while I'm building and testing my flow. 

     

    Compose your subject line and insert any dynamic content from your flow trigger if that suits your requirements.

    creativeopinion_16-1706388882661.png

    Add any static text and dynamic content into the email body.

    creativeopinion_17-1706389011046.png

    Run a test. Review the outputs of your email and ensure it's what your expecting. Adjust your email format until you are happy with it. Once you've confirmed everything looks good and your flow has been tested a few times. You can replace the recipient with the appropriate recipient.

     

    If you are looking for a way to send multiple SharePoint List items that have been assigned to a user in an email—check out this YT Tutorial: How to Send a SINGLE EMAIL ✉️ with multiple SharePoint list items | Build THIS Power Automate Flow

    In this tutorial I cover:

     How to send multiple list items in a single email with a Power Automate Flow

     How to create a dynamic date range

     How to use the Convert Time Zone action

     How to use a Filter Query in the Get Items action

    How to count number of items in an array

     How to use the Select action to extract a users display name and email address

     How to create a unique list of email addresses

     How to use the Create HTML Table action

     How to customize the HTML Table with CSS styles

    How to use the Send an email (V2) action

    How to use the Append to String Variable action

    How to create a custom list of items for an email

    How to use the Send an email (V2) action

    How to display singular or plural text based on the number of items returned

     

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response! If you're feeling generous— ️  Buy me a coffee: https://www.buymeacoffee.com/acreativeopinion

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

     

     

  • BenBennett321 Profile Picture
    114 on at

    Thanks for this detailed response, but I can't see in your flow where it looks for duplicates? it seems to be only looking for those account numbers that have changed? 

  • Verified answer
    BenBennett321 Profile Picture
    114 on at

    Anyway, I worked it out. 

     

    BenBennett321_0-1706632302805.png

    When an item is modified on my sharepoint list it checks that the value in the specified column matches already on the sharepoint list, (using the filter array) .

     

    The Select part just gets the certain columns from the list to identify the duplicates, turns it into a Html table which is put into the email.  The Compose action is just to add some CSS to make the html table more attractive.

     

    Thank you to myself.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard