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 / Email Confirmation for...
Power Automate
Answered

Email Confirmation forced in a loop

(1) ShareShare
ReportReport
Posted on by 19

Hi all,

HindAlmarzooqiP_0-1720687379787.png

i have this flow. My thing is to initiate this whenever a button is clicked in power app and moving forward it should lead to an approval process(which goes to a manager) and i want to send a confirmation that we received the records for the employee who submitted the data.

However, whenever i add an email step it's forces it to in a for each loop which sends the email multiple times depending on the number of records submitted. i want to send it once. I tried to delete the loop and forces it without but I get another error. Any workaround or clear solution?

 

Thank youuuuuuuuuuuuuuuuuuuuu

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

    @HindAlmarzooqiP you will always get an apply to each if you just add the email action after the get items because that action can potentially bring back multiple items from the list and it would need to loop through them.

     

    To get over that and only send a single email you need to use a Select action as follows. In my example I'm getting dates when a user has been in Europe. As you'll see, immediately after the get items is the select with the left field being the column titles I want and the right field being the dynamic content from the list.

     

    After that I added a Create HTML Table action.

    1-Flow.png

     

    I then added a Compose action with css styles because the default html table in Power Automate doesn't have any styling.

     

    In case you want to copy that style it is in the spoiler below. At the bottom of the Compose you select the outputs of the Create HTML Table action.

     

    Spoiler (Highlight to read)
    <style>
    table {
    border: 1px solid #1C6EA4;
    background-color: #EEEEEE;
    width: 75%;
    text-align: left;
    border-collapse: collapse;
    }
    table td, table th {
    border: 1px solid #AAAAAA;
    padding: 3px 2px;
    }
    table tbody td {
    font-size: 13px;
    }
    table thead {
    background: #1C6EA4;
    border-bottom: 2px solid #444444;
    }
    table thead th {
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
    border-left: 2px solid #D0E4F5;
    }
    table thead th:first-child {
    border-left: none;
    }
    </style>
    <style>table {border: 1px solid #1C6EA4;background-color: #EEEEEE;width: 75%;text-align: left;border-collapse: collapse;}table td, table th {border: 1px solid #AAAAAA;padding: 3px 2px;}table tbody td {font-size: 13px;}table thead {background: #1C6EA4;border-bottom: 2px solid #444444;}table thead th {font-size: 15px;font-weight: bold;color: #FFFFFF;border-left: 2px solid #D0E4F5;}table thead th:first-child {border-left: none;}</style>

    2-Flow.png

     

    Then in your email you select the outputs of that formatted table:

     

    3-Flow.png

     

    And this is the result with multiple items from the get items but just in a single email:

     

    4-Email.png

     

    Rob
    Los Gallardos
    Principal Consultant, SharePoint, Forms and Power Platform, WSP Global (and classic 1967 Morris Traveller driver)

  • HindAlmarzooqiP Profile Picture
    19 on at

    Hi Rob, wow many thanks for the very thorough reply and organization in your response. I appreciate it. I tried to do however my main goal is to just share an email to say that I have received the input. 

  • Verified answer
    Akshansh-Sharma Profile Picture
    298 Moderator on at

    @HindAlmarzooqiP ,

     

    Can you please implement these steps which will achieve your requirements

     

    1. create a new Trigger Parameter with name "RequestorEmail"
    2. When you are triggring this flow from your app i.e. OnSelect of your button pass this parameter value with the current user email like this FlowName.Run(RequestorEmail:User().Email)​ 
    3. Then use the dynamic content from your trigger and add the RequestorEmail into your To property of your send an email action 

     

     

    This will send an email to the requestor that you received their inputs without the need of Get Items

     

    Let me know how you get on

     

    --------------------------------------------------------------------------------------------------------------------

    Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉

     

    LinkedIn- https://www.linkedin.com/in/akshansharma/

  • HindAlmarzooqiP Profile Picture
    19 on at

    Hi @Akshansh-Sharma Many thanks!!! appreciate your inputs

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 273 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 135 Most Valuable Professional

Last 30 days Overall leaderboard