Showing results for 
Search instead for 
Did you mean: 
Resolver I
Resolver I

Using 'Do until' loop to email up to 10000 people

Hi there,


With help, I have been trying to build a Flow which can email up to 10000 people.


My current excel table list is 6600 lines long.


I discovered that the email connector is restricted to 256 emails so to get around this I have tried to build a flow which emails the first 256 people in my excel table and then loops back, selects the next 256 lines in my excel table and emails them and so on.


Currently my flow keeps emailing the first 256 people then loops back and emails the same first 256 people again.


Could someone please have a look at it below and see what might be causing my issue:


recruitment email 1.PNGrecruitment email 2.PNGrecruitment email 3.PNG


My compose formula is: 


Accepted Solutions

Yes that makes sense.  This is what I have now:  Email 14 1.PNGEmail 14 2.PNG

Will test in a few hours once my 24 hour email limit has reset

View solution in original post

Resident Rockstar
Resident Rockstar

Helped someone with this before, i cannot remember the title of the topic though.


What the solution ended up being is that it would email 256 at a time, keeping a counter and then selecting the next 256 from the excel spreadsheet each time.


You are probally better off getting a dedicated mailer like mailchimp though

Hi Girsty,


Yep you helped me build this, but sadly it's not working as we hoped.  I finally had a chance to test it and it just keeps circling around and emails the first 256 on my list again.  Can you see anything which would be causing it to not work properly?


Sadly my institution is very restrictive on what software/programs we are allowed to use so mailchimp is likely out





Yes i can see your flow will only ever email the first 256 as configured.


You are missing a action.


on your screenshot click the last "add a action" i.e. in the do until loop. Add another List rows action the same as the first one. But include the SkipCount variable you have defined.

Community Support
Community Support

Hi @PipManifold,


I have a workaround maybe could help you something.


You can backup the excel table, then create an Apply to each action to send the first 256 emails. After sending emails to delete these 256 emails, then List rows of the excel file, if there still have emails in the excel file send the next 256 emails, repeat it until the return value of List rows of the excel file is equal to 0.


Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


Hi Gristy


Thanks once again for all you help.


Sadly, it's still not working.


I've added the List rows present in table and put the Skipcount variable in the Skip count field and it still repeats the top 256 rowsEmail 13 3.PNGEmail 13 4.PNG


I also tried moving it up a level where I has the option to put the 'outputs' variable instead however once again it repeated the first 265 emails.


Email 13 1.PNGEmail 13 2.PNG

And ideas? 


Sorry i messed up.


Delete that excel action.


Move the original excel action in between the two loops just above the apply to each and make sure skipcount is set.



Ok, here is what I now have:Email fixed 1.PNGEmail fixed 2.PNG

Does this look right.  I'll test it tomorrow.

I think the Compose and Set Variable should be after the apply to each loop.


As the logic is:

1) get 256 rows

2) for each row if condition - send email

3) update skipcount


With them inside it will update each time each row is processed so may cause a issue. 


Good luck

Yes that makes sense.  This is what I have now:  Email 14 1.PNGEmail 14 2.PNG

Will test in a few hours once my 24 hour email limit has reset

Awesome, it worked!  It did give out after 3070 emails pretty close to an hour mark. Not sure what might have caused it to do that and will need to investigate when I need to send out reminder emails. However, that is better than before and it definitely was looking through my list.

in the settings of the loop, you can up the concurrency control so it does not take as long

Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,468)