web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Loop within a loop pro...
Power Automate
Answered

Loop within a loop problem

(0) ShareShare
ReportReport
Posted on by 18

Hi,

 

I need to send reminders to people attending activities on the day. It could be 4 different activities and various people attending one or many. I get items from a sharepoint list for the activities - all the info I need for however many activities there are that day. This is done in a loop.

 

I then want to send an email for each of these activities, but I need to get the attendee emails first. I use another get items and add the emails to an array, which creates a second loop.

 

My issue is to access the email array, I need to be in the second loop, but this means I get repeat emails as the email array is built. But if I send email after this loop, I don't have visibility of the array emails.

 

What am I doing wrong?

 

Cheers

 

Will

Categories:
I have the same question (0)
  • eric-cheng Profile Picture
    5,171 on at

    Hi @wanjos ,

     

    Can you share a screenshot of your flow?

     

    You can initiate an array variable and append to it in the loop from your email array.  You can then reference it anywhere in the flow.

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • wanjos Profile Picture
    18 on at

    Hi Eric,

     

    That's my experience of using variables in other flows, but not this time. Here's the screenshot.

     

    Screenshot 2021-09-25 165401.png

     

    Thanks for taking the time. 

  • Verified answer
    eric-cheng Profile Picture
    5,171 on at

    Hi @wanjos ,

     

    Sorry, I misread your question.

     

    If you want to email the array, I dont think it is possible as the body will expect string/HTML

     

    You can change your variable from array to string and and use Append To String.

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • wanjos Profile Picture
    18 on at

    Thanks @eric-cheng, worked perfectly!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard