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 / Apply to each submitti...
Power Automate
Suggested Answer

Apply to each submitting the entire array each time

(1) ShareShare
ReportReport
Posted on by
This is my first time using Power Automate and have managed to build out the attached flow. It takes a table from my Power BI report with each email address, the item number, and the list of alerts for each item. I then pull in each distinct email address as another table. I use a select, then create an array, then parse to json. The goal is to send an email to each distinct email address with a filtered table of just their alerts. I have been testing it by sending all emails to myself for now. Each time I get the correct number of iterations, but it is the same unfiltered table in each email. I have tried using the list from my array, body, from my json, and both output and output item from the select. Each with the same result. Any idea where the breakdown is?
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at
    It's hard to offer any recommendations without seeing your full flow and the logic behind it. Toggle off the New Designer and click each action to expand it. Upload a screenshot of your flow in edit mode.
     
    In the meantime, you might be interested in these YT Tutorials:
     

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.
    1️⃣ Cross-Referencing Data
    2️⃣ Filtering by Key
    3️⃣ Substring Matching

    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

    IN THIS VIDEO:
    ✓ 3 Ways to Use the Filter Array Action
    ✓ How to use the Scope Action to Group Actions
    ✓ How to Check the Number of Items returned from a Filter Array Action
    ✓ How to Cross-Reference Data in Excel with a SharePoint List
    ✓ How the Filter Array Action Works
    ✓ How to Access the Dynamic Content from a Filter Array Action
    ✓ How to Filter Items by a Key
    ✓ How to Filter Items by Matching a Substring
    ✓ How to Use Multiple Conditions in a Filter Array Action

    ---

    In this tutorial—I’m going to show you a quicker way to get the dynamic content from your Filter Array action—and it doesn’t require writing an expression.

    IN THIS VIDEO:
    ✓ How to Loop Through Filter Array Results in Power Automate
    ✓ Using Apply to Each with Filtered Arrays
    ✓ The Easiest Way to Access Dynamic Content from Filter Array
    ✓ Fixing Nested Apply to Each Actions
    ✓ When to Use Value vs. Body Dynamic Content
    ✓ Simplifying Power Automate Flows with Filter Array
    ✓ Troubleshooting Filter Array and Apply to Each Issues

    ---

    In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:
    1️⃣ Looping through a Single Item
    2️⃣ Creating Unnecessary Nested Loops
    3️⃣ Looping through an Unfiltered Array

    At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.

    IN THIS VIDEO:
    ✓ How to avoid the Apply to Each action with a single item array
    ✓ How to use the item() function to access dynamic content in an array
    ✓ How to prevent unnecessary nested Apply to Each action loops
    ✓ How to use the Select action
    ✓ How to convert an array to a string with the Select action
    ✓ How to use the Filter Query field
    ✓ How to count the number of items in an array
    ✓ How to use a condition control
    ✓ How to use the concurrency control
    ✓ How to set a top count
    ✓ How to use Compose actions for troubleshooting
     
     
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
     
  • lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at
    What do you mean by "from Power BI Report"?  Are you referring to a PowerAutomate visual in a Power BI report or are you running a DAX query against a semantic model?
     
    How do you create the unique list of email addresses? via union() ?
     
    You would then filter the original array (from the trigger output or from "First Table Rows")  and stuff the filtered array as a HTML table into the email.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
     
    Apologies, I cannot read all those little actions easily but I feel like you are close, so please excuse me as I write these down just as a verification you.
     
    Assuming you have a column called "EmailAddress"
     
    0. Create a variable with your CSS for your HTML Table that goes in Email
    1. Grab Data
    2. Use a Select to grab only the Email Column (using the advanced map to just grab email so its a simple array with duplicates)
    3. Use a compose to do a Union of the body of the Select
    4. Do an Apply to each on the Output of #3
    Inside Apply to Each
    --Use Filter Array on data from #1, using the Current Item compared to EmailAddress from the Source Data Array
    ----Use a Select to grab whatever Columns you want from the previous Filter Array Step
    ----NOTE: add your headers to the array (multiple different ways)
    ----Add your Send Email Action
    --------Add your Hello whatever
    -------------Add your CSS style for your table (or any pre-words before that)
    -------------Add your table
     
    And you should have sent out a unique list of email data just for each person uniquely
     
    As I said I can barely read that.. I am old, so I am putting this here in case you see something that stands out.
     
    That or please share the Inputs and outputs of a flow Run so we can better point to the thing doing the wrong thing :-)
     
    I am not sure why you need to create a JSON at all as your data from your report should be g2g.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard