Send emails batch wise and give break 1 hour.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 08:00 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 04:48 AM
Hi @Ankur Bawiskar sir, I have taken the output variable type is Aray.String. and mapped this output from script action output (batches).
input variable type is Array.string and mapped input to input variable(users_list). And added this script action into the flow designer and given the input of all delegate users sys_id's.
If anything I need to be change please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 05:23 AM
should work ideally
did you add logs and verify in your script step?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 05:58 AM
@Ankur Bawiskar , might be for each is not working as expected. Please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 06:06 AM
for each requires array of objects and your output has it
so ideally it should work
did you try adding log in script?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 09:24 AM - edited ‎12-17-2024 09:31 AM
Hi @Ankur Bawiskar sir, if we are getting out put of batches wise, and it is stored in for each item, then what are next steps I have to taken to send mails batch wise. For sending Each batch delay with 5 minutes.
with in the for each Added action 'send mail' then it was send to all the batches. Please Suggest send batch mails with delay of 5 minutes