Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

"Dotwalking" in a For Each in Flow Designer

Erik Nelson
Kilo Sage

Hello all,

I've got a Flow build in progress that on trigger, will look up Business Applications that meet a specific criteria so that we can use that information for sending notifications to Business Owners. The issue I'm running into, is I want to make sure we're sending an email only to each unique Business Owner as opposed to one email per Business App.

 

I'm not seeing a way to get to Business Application.Business Owner in the "For Each" but I'm presuming there's a way to parse the responses to get the data, I'm just not seeing a way to do that. Has anyone accomplished this previously or are there suggestions on how to do it?

 

Thanks!

5 REPLIES 5

SAI VENKATESH
Kilo Patron

Hi @Erik Nelson 

 

In the For Each action, you are working with the complete record.
Since your goal is to send an email, you can add a Send Email action after the For Each step. In the To field, select Technology Owner Email so the message is sent to the appropriate recipient.
 
 

Screenshot (31).png


Thanks and Regards

Sai Venkatesh

Hi @SAI VENKATESH 

 

While this is definitely helpful, it still creates the issue I'm trying to avoid, which is sending multiple emails to the same people. I did try it, but instead of sending 210 total emails (number of business owners) it sent 958 (number of business applications).

 

Erik

Hi @Erik Nelson 

 


then you need to use custom action lookup all records take business owners and keep it in array and pass the output of array to flow so that you will not see any duplicates 

 

thanks and regards 

Sai venkatesh 

Ankur Bawiskar
Tera Patron

@Erik Nelson 

it's not straight forward when it comes to flow to handle this

check this blog

Article [2] -> Flow Designer: Weekly Incident Summary Email per Assignment Group 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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