Send emails batch wise and give break 1 hour.

prudhviraj1
Tera Guru

Send emails batch wise, send 500 mails then give 1 hour break then send another 500 users. I have tried with fix script gs.sleep it was impacting the system performance. The output of all emails i have stored in Array. I am tried with flow designer by using for each condition the output I am getting 234 mails only. I have checked the related system property the count upto 16000+.

Please suggest how to send without using system performance. 

@Ankur Bawiskar  sir please suggest 

22 REPLIES 22

@prudhviraj1 

what's your output variable type?

at line 16 use this

outputs.batches = batches.toString();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar  sir, I have used output variable type is 'Array.String'.
outputs.batches = batches.toString();
I have used this but no use. i am still getting same output result

@prudhviraj1 

then don't use toString()

outputs.batches = batches;

share the action configuration for output variable

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar Sir, I am trying to divided all the delegate users into batches. and sending email to batch wise. when i am trying to using 'For Each Item' (I have checked System property the limit is exceeded) it was sending 246 Mails at a time.
so i am trying to sending each batch 100 and give 10 minutes break.
I am getting all the users sys_id's. Please check the attached screenshot getting all user's sys_id's in the configuration details.
please suggest

prudhviraj1_0-1734437887782.jpeg

 

@prudhviraj1 

in the action's outputs section did you create an output variable of type Array.String and then map output from script step as input to that Output variable?

this Output variable will be the actual output from your flow action

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader