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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / This output is an arra...
Power Automate
Unanswered

This output is an array. A foreach cannot be nested inside of another foreach.

(0) ShareShare
ReportReport
Posted on by 608

I have a business requirement where for each salesforce user I need to get all opportunities closed today and send combined single email to each user combining multiple closes opportunities per user using compose function.

when I try to do it it says This output is an array. A foreach cannot be nested inside of another foreach.

 

Requirement-

 

For each salesforce user every night get all closed opportunities (close date as today) and combine those closed opportunities in a single email(per user) and send email to each user(with a list of closed opportunities with date)

 

How to do this?

I tried using get salesforce users and then for each get opportunities with close date as today (I can not add second condition where owner id is for each user)

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    on at

    Hi AmitLoh,

     

    It seems that your requirement cannot be achieve directly with only one Flow process, please try to separate them and create 2 flows to see if this works.

     

    Best regards,

    Mona Li

     

  • AmitLoh-Powerap Profile Picture
    608 on at

    I am trying this as well. It seems to be tricky to do it in 2 seperate workflows as I need to get user specific closed opps. data then combine and send email to each user.

  • keerthich Profile Picture
    4 on at

    Hi,

     

    I'm facing similar issue i.e. This output is an array. A foreach cannot be nested inside of another foreach.

     

    can you please let me know how you handled this issue.

     

    your inputs are highly appreciated.

     

    Thanks

    keerthi

  • parry2k Profile Picture
    14 on at

    Any update on this how it was solved? Any input/help will be highly appreciated. This is what I'm doing:

     

    - getting rows from sql table 

    - foreach for each row and then use text speach to get key phrases

    - once i have these key phrases whcih are array, i need to insert into a table

     

    since I'm unable to add foreach loop in other foreach, is there way that I can make this array a string and then insert into a table?

     

    Not sure what is the right solution but any help will be great.

     

    Thanks,

    P

  • LozzieD Profile Picture
    203 on at

    Another "broken by design" Office 365 feature.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard