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

Community site session details

Session Id : DxWYtAhg3o5XWImUTkJliJ
Power Automate - Building Flows
Answered

Emails Sending Twice

Like (0) ShareShare
ReportReport
Posted on 1 Feb 2023 13:50:57 by 271

Hi all,

 

I have a flow setup get details from a submitted form, email these details out and add these details to a spreadsheet. It is all working with no issue, except that it is sending the email to all of the recipients twice!

 

It is my first flow using Get User Profile connector so I can only assume it is something to do with this.

 

In the send an email step of my flow, I have added the email address from the Get User Profile step in as a CC. When I do this it automatically puts the Send an Email into an apply to each. I reckon this is causing it to duplicate the emails, but I have no idea why!

 

Gwill1983_0-1675259050219.png

 

My flow is set up to get the response details, get the user details using the name from one of the answers within the form then check if there is an attachment against the form.

After this condition, it gets the attachment from the form and then moves to the email stage depending on some variables within the form response.

 

Gwill1983_1-1675259202061.png

 

My email step looks as below:

 

Gwill1983_3-1675259344747.png

 

I have checked the outputs of a flow run and it shows 1of2 in the email stage so it is clearly being duplicated, but the email details are identical

 

Gwill1983_4-1675259439579.png

 

 

Any help to understand this will be very welcome! 🙂

 

 

 

 

  • Gwill1983 Profile Picture
    271 on 03 Feb 2023 at 15:08:43
    Re: Emails Sending Twice

    Thanks again. I fixed this by using a combination of search for users and get user details in the end. All works fine now. 

  • Verified answer
    wskinnermctc Profile Picture
    6,517 Moderator on 02 Feb 2023 at 15:46:26
    Re: Emails Sending Twice

    Your issue is still strange with using the 'Search for Users (V2)' and sending 2 emails to the same address. Because if your 'Search for Users (V2)' is only finding a single person, the Apply to Each would still exist, but it should only run once. So Apply to Each isn't a bad thing.

     

    Can you go look in the outputs of the 'Get PM User Details' of a previous test/run and see if there are multiple "Email" fields in there? Even if they are duplicate, I would just look to see what caused PA see as 2 separate items and run the Apply to Each twice.

     

    If you want to try and avoid the Apply to Each then you can use the Select action to map ALL the responses and then use a compose that gets the First item of your select action. So this is assuming that the results of the Search for Users is actually getting a single item or at least the first returned item is the correct person.

     

    Select Map Email and Compose First(Select Output)Select Map Email and Compose First(Select Output)

     

  • Gwill1983 Profile Picture
    271 on 02 Feb 2023 at 10:54:57
    Re: Emails Sending Twice

    thanks for this. 

     

    My step is actually a search users step having looked deeper into it. The issue I have with using the Get user profile (V2) is that I dont seem to be able to get an email from the name using that connector, only a profile using an email

  • wskinnermctc Profile Picture
    6,517 Moderator on 01 Feb 2023 at 15:14:38
    Re: Emails Sending Twice

    Is your step "Get PM User Details" really a "Search for users (V2)" step? Because that would cause PA to automatically put an apply to each on the value because a Search for users can return multiple profiles.

     

    Are you able to use the "Get user profile (V2)" action instead which would be a single response and not require an Apply to Each.

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete