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 / Sending out emails pro...
Power Automate
Unanswered

Sending out emails produce duplicates

(0) ShareShare
ReportReport
Posted on by

I'm currently building a flow that includes nested If. First determine whether the Condition_now is inactive. If no, do nothing, If yes, I need to check whether the count_emails is less than 4, if yes do something (include send emails), if not do other things (remind myself).

Originally, every person receive one email if his information for condition_now and count_emails are all satisfied. But, currently, every person receives 6 emails if his information for condition_now and count_emails are all satisfied.

Why so, is it because sending emails are inside apply to each which produces duplicates?

This is my current flow:

Yue_Jiang_0-1710129645062.pngYue_Jiang_1-1710129666775.png

 

Yue_Jiang_3-1710129761234.png

Under the No's Apply to each, I have a condition to determine whether the count_emails is less than 4. 

Yue_Jiang_4-1710129843072.png

Yue_Jiang_5-1710129878232.pngYue_Jiang_6-1710129887427.png

It's strange that you can see there is only 7 HTML tables created under "if yes", that means 7 persons each receive 1 email. But in fact, these 7 persons each receive 6 duplicated emails. Why So. 

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Yue_Jiang 

    As you can see , you put the "Send an email" into a Apply to each 3 loop.

    vyueyunmsft_0-1710134885636.png

    And the Apply to each 3 loop 7 times , so the "Send an email (V2) 3 " and "Send an email (V2) 4" will also execute 7 times in your side.

     

    Best Regards,

    Yueyun Zhang

  • CU-20080800-0 Profile Picture
    on at

    Sorry, I'm bit confused. My result is like for the Send an email (V2) 3, it's to send to 7 suppliers with each one having an email. But the problem is that now each one has 3 same emails sent to themselves. For the Send an email (V2) 4, it's to send emails to remind myself that those suppliers have received the emails. But I received 21 emails for 7 suppliers, which meant that three emails per supplier. 

    I used the Apply to each because I need to send different emails to different suppliers. Is there any solution?

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Yue_Jiang 

    In my understand , it will just send 7 emails in "Send an email (V2) 3 " and 7 emails in "Send an email (V2) 4". 

    Do you mean you get 21 emails?

     

    Best Regards,

    Yueyun Zhang

  • CU-20080800-0 Profile Picture
    on at

    Hi, Yueyun

    Yes, the first 'Send an email (V2) 3' is to send 7 suppliers each person one email, in total 7 emails, but currently there are 21 emails sent out. The second one also sends out 21 emails. 

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Yue_Jiang 

    It's weird, can you check if there are other loops in your flow run history that contain actions to send an email?

     

    Best Regards,

    Yueyun Zhang

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Yue_Jiang 

    Dose this "Apply to each 3" is in your "Apply to each" loop?

    vyueyunmsft_0-1710316109888.png

    If this , this may the reason to send three same emails in your side.

     

    Best Regards,

    Yueyun Zhang

     

  • CU-20080800-0 Profile Picture
    on at

    Yes, but the first one is automatically created because I need to use condition. The second one because I need to create HTML table row by row, so Apply to each can solve this issue. Is there any method to avoid duplicates?

    Yue_Jiang_0-1710316339366.png

    Yue_Jiang_1-1710316352984.png

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Yue_Jiang 

    So in my understand, you just need to use this apply to each to set the condition. 

    vyueyunmsft_0-1710317123826.png

    So in my understand , you can not need to use loop to judge in your side. We need to just use condition not use Apply to each.

    Do you want to judge if exist [Count Emails] <4 in your side?

    Dose the [Count Emails] is a number column in your sharepoint list?

     

     

    Best Regards,

    Yueyun Zhang

  • CU-20080800-0 Profile Picture
    on at

    Yes, [Count Emails] is a number column in my SharePoint list, but Apply to each is automatically created when I reference to [Count emails.]

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Yue_Jiang 

    If you just want to judge the [Count Emails] if exist number < 4 , you can use this in condition.

    This is my SharePoint List:

    vyueyunmsft_0-1710317775741.png

    This is my test flow:

    vyueyunmsft_1-1710317927738.pngvyueyunmsft_2-1710318004256.png

    item()

    length(body('Filter_array'))
     
    So that you can not use the Apply to each action in your side!
     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard