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 / Losing access to our d...
Power Automate
Answered

Losing access to our data fields and variables after exiting a nested loop

(0) ShareShare
ReportReport
Posted on by 4
We are working on a flow trying to send a weekly e-mail to multiple recipients that contains an embedded report table which contains a summary of past due inspections for equipment for a particular district in our company where we have 13 separate districts.
The process for a nested loop and inside that nested loop we have an e-mail which is sending approximately 40 copies of the e-mail instead of sending 13 separate individual emails to each district that has each district’s pertinent data. The fields come unreachable outside of the nested loop. How can I call this data to include it inside of the emails that I am delivering without the loop sending out 40 e-mail messages? We currently have it sending emails to ourselves so that the in business is not impacted.

I’ve exported the Flow as a Zip file and posted it here. This flow should show where the process failed.


 
Categories:
I have the same question (0)
  • Verified answer
    Kalathiya Profile Picture
    1,537 Super User 2026 Season 1 on at

    I’ve reviewed your automation, and the issue is happening because in the Create HTML table column mapping you’re using output from the Parse JSON action, and in the From field you’re using the Filter array body. Because of this, Power Automate is automatically wrapping it inside another Apply to each loop.

    #1. Delete the inner Apply to each loop.
    #2. After Parse JSON, add the Create HTML table action directly.
    #3. In the From field, select the body from the Select action output and map all the required columns.
    #4. Then add the Send an email action and pass the Create HTML table output along with the Compose Table Styling output into the email body.
     
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
     
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
     
     
  • TV-17021426-0 Profile Picture
    4 on at
    Thank you for your detailed explanation, @Kalathiya. This was helpful in getting us past the hurdle that we faced. I am trying to locate the button for Mark as Answered. Can you direct me where to find this option?

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard