cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PipManifold
Level: Powered On

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: 

add(variables('SkipCount'),256)
1 ACCEPTED SOLUTION

Accepted Solutions
PipManifold
Level: Powered On

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

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

11 REPLIES 11
Super User
Super User

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

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

PipManifold
Level: Powered On

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

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

 

Cheers

 

Pip

Super User
Super User

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

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 Team
Community Support Team

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

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.

 

PipManifold
Level: Powered On

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

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? 

Cheers

Super User
Super User

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

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.

PipManifold
Level: Powered On

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

Awesome!

 

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

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

Super User
Super User

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

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

PipManifold
Level: Powered On

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

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

PipManifold
Level: Powered On

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

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.

Super User
Super User

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

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

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (6,027)