workflow approval user script in flow designer

deepika46
Tera Contributor

Hello Experts,

 

I have a workflow which has a 'approval user' where it is doing the following scripts

 

// Set the variable 'answer' to a comma-separated list of user ids and/or group ids or an array of user/group ids to add as approvers.
//
// For example:
// answer = [];
// answer.push('id1');
answer = [];
var appr = new GlideRecord('u_office_365_member_firm_groups');
appr.addQuery('sys_id', current.variables.o365_site_country);// comparing with the RITM Variable value
appr.query();
if (appr.next()) {
answer.push(appr.u_mf_country_team_lead);//u_mf_country_team_lead field has the users to whom the approval should go
}

 

 

Can anyone tell me how i can do the same script in a flow in flow designer. 

 

Thanx in advance.

2 REPLIES 2

SanjivMeher
Mega Patron

You will have to convert it to a action. And then return the output to the flow and use in the approval 

Bill Martin
Tera Sage

Hi @deepika46 ,

 

I have created this video to guide you on how to create a flow using Flow Designer.

 

Here is how: ServiceNow Workflows: How to Create a Workflow in ServiceNow Using Flow Designer

 

Please like and mark as accept solution if you find it lucrative.