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

How to send email per batch

Hi there,

 

I currently have a large email list that can go up to 800 users. The list is pulled from a SharePoint list where I keep everything currently using the Office SendEmail to email those users.

 

However just found out that theres a limitation (on our exchange system) where you can only add 500 users per email.

 

So i am looking to see if anyone would know of a formula that could send emails by batch. 

 

Something like: 

Clear(Email_Batch);
If(
    CountRows(Sharepoint_Source) >500,
    Collect(Email_Batch, Some_Function_to_get_the-First_500_Entries_VIA_Sharepoint)
    Collect(Email_Batch, Some function_to_get_remaining_emails)
    ForAll(
      Email_Batch, 
      Office365.SendEmail( User.Email, "SubJect Line","Body Text", { BCC: EMAIL_LIST_FROM_BATCH })
    ,
    Office365.SendEmail( User.Email, "SubJect Line","Body Text", { BCC: Sharepoint_Source})

)


would someone know how to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to send email per batch

Then I expect you would have to batch that out by layering the FirstN functions.  FirstN(FirstN(data,1000),500) or something like that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
3 REPLIES 3
Super User
Super User

Re: How to send email per batch

Could you do something with FirstN(Table, 500) and LastN(Table, length(Table) - 500) as long as you know you'll be less than 1000 that should get the records in two batches of 500 or less.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Owizardo
Level: Powered On

Re: How to send email per batch

While this works in thoery if im always under 1000, what about when i start going over 1000 subscribers? 
How would I filter 3 batches of 500? Would you know?

Super User
Super User

Re: How to send email per batch

Then I expect you would have to batch that out by layering the FirstN functions.  FirstN(FirstN(data,1000),500) or something like that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 171 members 5,209 guests
Please welcome our newest community members: