cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
P_Molitor
Helper II
Helper II

Help extracting unique emails from returned data and using them in the Flow

I created a scheduled Flow that gets items from a list that have a "Complete" field of "NO" then places that in to an HTML table and emails the information. The email sent looks something like this.

 

The following Move Slips are awaiting completion and may be assigned to you.

Name

Submitted

Effective

MoveID

Responsible_Party

Anne Droyd

2022-02-01

2022-02-21

4

Responsible@email 

Jacque Strappe

2022-02-01

2022-02-21

5

Responsible@email


Please follow this link and complete your move slips using the correct Move ID.
https://forms.office.com/r/BLAH-blah-BLAH  

 

The Flow looks like this:

notification flow.png

 

I was hoping to have the table sent to the responsible parties and cc'd to me but I'm not sure how to make that happen. If I do an apply to each on the email action, if the same person is responsible for multiple entries then they will get multiple emails, as will I being cc'd. Is there a way I can take the info from the "Responsible Party" column, filter it for unique emails, then have that output as a string of emails seperated by ";" so that I can have that in the email TO: field as dynamic data so that only one email goes out? (at some point there might be 10-15 entries in this table with multiple duplicates for "Responsible Party")

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @P_Molitor 

 

I've updated the video to include a demo of how to get distinct email addresses from an array (which can be an Excel Table or Microsoft List or any other array of data to be honest).  This should take you straight to the point in the video Send Unique Emails with HTML Table using Data from Excel #PowerAutomate - YouTube

 

This then negates the needs for table one in the post I referred to earlier, you can get distinct emails and via the apply to each send an email of only the data relevant to the responsible party.  Hope I have understood you correctly.

 

Damien

View solution in original post

7 REPLIES 7
DamoBird365
Employee
Employee

HI @P_Molitor 

 

You can do this with a select action.

 

From Value from Excel

Put the select into Text mode and insert the Responsible party.

 

This gives you an array of all emails.  Next you want to get distinct emails.

 

Using a compose, use the union expression Union(outputfromselect, outputfromselect).

 

You now have your array that you can supply to the apply to each and then filter your original data set and send emails to the unique emails.

 

A similar q was asked here Re: How to send two different tables in one email ... - Power Platform Community (microsoft.com

albeit they already had the distinct emails.  My quick video will show you how to complete the rest of your solution if need be.

 

Please consider accepting my answer as a solution if it helps to solve your problem.

Cheers
Damien

Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts, or take a look at my website. Thanks

 

 

I'll give this a try at some point today substituting sharepoint list functions where necessary. Watching the video, I was a little confused where the Send Email was in the Apply To Each using the [Email ID] from the List Rows action as the recipient, but I'm sure I just don't fully understand how the Apply To Each function operates.

Hi @P_Molitor 

 

If you need more detail or get stuck, give me a shout.

 

Damien

Hi @P_Molitor 

 

I've updated the video to include a demo of how to get distinct email addresses from an array (which can be an Excel Table or Microsoft List or any other array of data to be honest).  This should take you straight to the point in the video Send Unique Emails with HTML Table using Data from Excel #PowerAutomate - YouTube

 

This then negates the needs for table one in the post I referred to earlier, you can get distinct emails and via the apply to each send an email of only the data relevant to the responsible party.  Hope I have understood you correctly.

 

Damien

Awesome! I tried it earlier and built it wrong, but I think the video has me almost there. I'm using a sharepoint list instead of excel, so it looks a little different. Here is what I have now (I've appended this to the bottom of my current flow so as to not change the earlier less featured version that was working).

 

Filter array.png

 

This is where things are getting messed up. In your video, your Email To: field is [Email_ID] which I believe corresponds to my [New Ko-Cho] (this is the output of my (Get items) action that corresponds to the column with the emails in it); however, when I place [New Ko-Cho] here, it automatically puts my (Send an email) action in to its own (Apply to each) action where as yours remains as part of the larger (Apply to each) action. I'm sure I've done something wrong, just not sure what. Thanks!

@P_Molitor

 

I know what it is, and it caught me out. I know you didn’t watch the playback of the flow because I too made that mistake 😂. Sorry. 

The email address is current item. This is because the input to the apply to each is a simple array of emails. For each loop we use that email in the filter and to then send the email. 

The rest looks great.

 

Damien

HA! I literally had it paused while the Apply to each was in operation. My test after making that change seemed to work, but I only had one unique email after applying my earlier OData filter query, so I'll have to finagle my list so that it returns multiple emails for the (Apply to each) action to process in order to fully verify operation. Assuming that works, I'll be back here to accept your solution. Thanks for all your help! The video definitely made things easier.

Helpful resources

Announcements

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

Users online (3,898)