steps to add a second SharePoint online list to NAC workflow.
I have a NAC workflow that has a connection to a SharePoint online list set up for ‘Nominations’, and emails are sent to different recipients depending on which region is selected in a regions dropdown on the nomination form. I also have a ‘Contact’ list that has for each region a different email recipient to email the nomination to.
In my NAC workdlow I have a connection to the site URL containing the ‘Nominations’ list below. Question is how do I add the ‘Contacts’ list. The contact list is in the same site collection as just another list. How to add the second list (contact) to the NAC workflow.
Connection to tenent
Page 1 / 1
A simple approach is to just create sharepoint groups for each region and add your people in there, unless your business requirements do NOT allow this?
If you can just do a get members from sharepoint group for the region you need and add semicolon to your email recipient field and dump the collection right next to the single recipient in the TO field.
Does your contact list have a region field to ensure you can filter the contacts for that region?
Thanks for the reply, our existing contact list has two columns, ‘Region’ and ‘Email’ and we aren’t likely to create new SharePoint groups as we have many different ‘contact’ lists for many different forms and we’re tasked to getting them tied to their own NAC workflows. Each contact list may for one form contain regions/email as noted but other forms may have facilites/email and other forms same deal, that would be a lot of groups the number of forms to get tied to different NAC workflows. I would be great to have two lists available to the same NAC workflow or how maybe to have two separate workflows call/return region/email from contact list back to the NAC workflow that is already connected to the nomination list (that has the region) ?
So you can follow these steps:
1) Query a list action for your contacts list and condition for region to grab all contacts for that region...assuming that's what you nees.
2) Add a for each loopl - loop through all returned list items of uour wuery results in step 1
3) Add an add an item to collection to loop and pass the email of the person field or email if using text field from the loop for each current item object to build one collection of recipient emails.
4) On send an email action you should be able to insert collection of emails in one click from the collection you created in step 3 to the TO field along with additional recipients you may need seperated by a semicolon.
Hi, thanks for all the suggestions. I was able to do this on my own another way, I found in the ‘Connetor Library’ a solution I’ve made available here.
In the ‘Connector Library’ is ‘SharePoint Online’ click to open that.
When open look for the ‘Query a List’
In the right hand menu no need for a new connection its already engaged in this sitecollection, The query a list gives then all lists in the sitecollection to choose from so I picked the list I needed to add to the one I started with and now I have elements from both lists (same site collection) now available in one workflow.
Now in my send an email ‘insert’ option I can select the contact email put into a variable then save/publish.
No problem.
That is exactly what i said to do lol
So it let's you insert all emails straight from the contact email object? I thought you would have to loop through all records returned to build a string of emails the object but ok. That's cool.
So you still have to loop through all your list items if you have an email address per list item in your list you queried.
So you need to do the loop action to collect all the emails from all list items from that list before you can add them all to the recipient's field. They will be grayed out because all items of a list is returned as a collection of information, not just one record. If you only have one list item in your list you queried, you can use the first item object to get your contact emails.
Sorry my previous steps were not detailed enough with pictures, I was responding from my mobile - my apologies. :(