Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

nding multiple emails from a collection





I'm making an internal ordering system where my department gets orders from people all around the organisation. They submit their respective orders using another app, saving the data on our in-house SQL server.


In the second app I aggregate the separate orders into a single one. For each order row the name and email of each person is stored, along with information about the product. The screen shot shows the aggretated list in the lower half, where one person can have multiple entries.





From this list I have made a grouped collection, since each person needs to receive only one email with all the products he or she ordered. I do this with:


ClearCollect(cGroupedOrders; AddColumns(GroupBy(gOrderraderOrderScrn.AllItems; "Bestallare"; "BestEpost"; "Orderrad"); "Ordertotal"; Sum(Orderrad; Summa)))  and it works like a charm.


Here's (finally) my problem: How do I send an email to each of the recipients in the cGroupedOrders collection?


I tried doing a ForAll(cGroupedOrders;  Office365.Sendmail(...)) but I get the message that I cannot use SendMail in ForAll.


What options do I have? Is it possible to use the SendMail function at all, or do I have to do a Flow instead?


Thanks for any input you might have!


Community Support Team
Community Support Team

Re: nding multiple emails from a collection

Duplicate thread:


Please consider send the Email under Flow, which should works.




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 192 members 5,424 guests
Please welcome our newest community members: