cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PipManifold
Helper II
Helper II

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

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
Gristy
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

 

Cheers

 

Pip

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.

v-litu-msft
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? 

Cheers

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.

Awesome!

 

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

View solution in original post

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

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (76,591)