cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Selectable recipients and distribution lists

Hello All, 

 

I created a SharePoint list to track tickets/issues. This includes recipients for the operator to select from. I created a flow which will send out a formatted email with the information from the list. I can add recipients directly into the email but opted to get the recipients information through the Get User Profile. This way I can create a condition in the flow that determines all selected recipients and in the Send Email in the To list I have all of the recipients listed as Dynamic Content items. This allows me to only send the email to the recipients selected in the list by the operator. All of this works so far but some of the recipients are distribution lists. Since distribution lists are not users they don't resolve and the Flow throws an error. Is there any other way to make the DL a Dynamic Content item that can be added as the email recipient placeholder?

10 REPLIES 10
yashag2255
Super User
Super User

Hi @Anonymous 

 

So the get user profile action must be failing in the flow for you. You can add a parallel branch and make that action run only after the previous action has failed. 

 

You can also use the Office 365 groups connector to list members of a group and then pass the id of the DL to that to list members and then get each user profile too. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

efialttes
Community Champion
Community Champion

Hi!

Which kind of "distribution lists" are you using? Microsoft TEams? Office 365 groups? 'Distribution lists' defined in your Office 365 Outlook contact list? Sharepoint groups? Other?

Also, how is defined the column 'Recipents' in your Sharepoint List? Multiperson? Multichoice? Single line of text?

Thanx!

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

Anonymous
Not applicable

Hello and thank you for the reply. 

 

I am pulling little over a dozen profiles in this flow. Most are users, there are two shared inboxes and one DL. No matter where in the order I put the DL it will fail. I have not tried parallel yet. I will give it a go and report back. 

 

Also can you tell me more about the Office 365 groups connector?

Anonymous
Not applicable

Hi and thank you for the reply.

 

The DL's are not part of a group or belong to any user account. They are simple email addresses that will forward any message to the listed recipients. There is no other function to them. I hope I am explaining that right. 

 

In the SharePoint list when an item is created there is a selection of recipients available that will have to be completed before submitting. It is Multi choice. At least one will have to be selected. It is a list of names. In the Flow I created a condition that looks for those names. Alas "If 'recipients name' is 'exactly' like 'Name' then ....". 

Hi!

Understood. And you assigned the multichoice output (which I assume it is an Array) as the input of an 'Apply to each', right? Then inside the 'Apply to Each' you execute 'Get User Profile', correct? So you build an output string with all emails addreses separated by semicommas, then assign this string to the 'Send an email' 'To' input, right?

If not this way, please share a screenshot from your current flow design to better understand current logic

 

One more question: this multichoice stores usernames and DL email addresses, right?

IF so, you can distinguish inside your Apply to each if the input has email address format, or, it is a username. If username, then do 'Get User Profile' and append to your output string its email. If email, append it to your output string without 'Get user profile'.

 

Please note @yashag2255 suggestion is also a valid approach

Hope this helps

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

Anonymous
Not applicable

Yes, well almost:

Understood. And you assigned the multichoice output (which I assume it is an Array) as the input of an 'Apply to each', right? Then inside the 'Apply to Each' you execute 'Get User Profile', correct? So you build an output string with all emails addreses separated by semicommas, then assign this string to the 'Send an email' 'To' input, right?

Yes and yes. I actually get the user profile before the apply to each, not sure if that makes a difference. I am also pulling each user separately since I need a separate Dynamic Content token for each one. And yes. 

 

IF so, you can distinguish inside your Apply to each if the input has email address format, or, it is a username. If username, then do 'Get User Profile' and append to your output string its email. If email, append it to your output string without 'Get user profile'.

Yes, yes and how do I append to output string without 'Get user profile'?

 

Flow 20200417-1.JPGFlow 20200417-2.JPGFlow 20200417-3.JPG

 

 

Hi!

Sorry, it must be me, but do not see any clear relationship between the 3-4 screenshots you shared. Which comes first, which comes next, etc? I can see also 2 different 'Apply to each' action blocks, right? Need more context info, sorry

THanx!

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

Anonymous
Not applicable

Sorry, i did not provide any context. The first image is a test flow I created to test this. I am testing it with a shared mailbox, a DL and a user (me). It works for the shared mailbox and me but throws an error with the DL.

 

the other two pictures are of a Flow that is actually working. These are all individual users though, not DL's. I wanted to show how i have it set up in the flow. This works but as there are more and more users added to it this can become unmanageable so I would like to use distribution lists instead of usernames. 

 

Also, our companies IT dept. is adamite about the naming conventions of those DL's. I am not sure if I can simply create groups or teams in place of the DLs and how the naming convention would be influenced. Do users have to accept being in the group or team in order to receive the emails. I can also imagine that they may be uncomfortable with the idea of being in a group or team that they are not an active member of. Just thinking out loud

Anonymous
Not applicable

bumping this for visibility

Hi @Anonymous 

 

I have a solution to your DL situation but this one could be a long one. Currently the problem being faced is none of the actions recognize this DL or a Security group or an O365 group at once. But the Graph API can do it. Reference here: https://docs.microsoft.com/en-us/graph/api/group-list?view=graph-rest-1.0&tabs=http 

 

Now the action you are looking at is GET groups (not a group as we do not have an id for the group we just have the email)

 

So use the expression to filter in the URI as : https://graph.microsoft.com/v1.0/groups?$filter=mail+eq+'mail@domain.onmicrosoft.com' 

 

You can create a custom connector or use the HTTP action for that. Either way, it returns with a response with lot more details: 

 

This should return the ID of the group as shown in the SS below. 

nn.PNG

Now that you have the ID, in the flow add an action as list group members and then select to pass custom ID and pass the ID from the outputs of the above action. 

 

Once you do that, it returns with a list of users in that specific DL and then you can use the append to string to append all their emails. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Helpful resources

Announcements

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros 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! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!    

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!

Users online (5,715)