cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SunilK1990
Frequent Visitor

How to send all list items in a single email after looping through the list using Apply to each?

I have a scenario where I'm using conditions in apply to each. It's checking the condition  for each list record. If the condition is true it must send out a mail. It is sending out multiple emails, one email for each item separately in the list. How do I get all the items in one email? 

2 REPLIES 2
Krishna92
Microsoft
Microsoft

@SunilK1990 

 

You can use an array variable to store the data and you can pass all the data stored in this array into single email.

Create a array variable after the trigger in flow.

 

In the APPLY TO EACH LOOPS where you have the send an email action replace it with APPEND TO ARRAY and this will store the value into the array.

 

In final email you can pass the values stored in this array over a single email.

 

If this information helps you, please hit the like button and mark the solution as resolved, so that it will help other users in future.

v-litu-msft
Community Support
Community Support

Hi @SunilK1990,

 

Has your problem been solved?
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Best Regards,
Community Support Team _ Lin Tu

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,951)