workflow approval user script in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 02:53 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 03:04 PM
You will have to convert it to a action. And then return the output to the flow and use in the approval
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 02:34 PM
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.