Amit Gujarathi
Giga Sage
Giga Sage

Hi All,

I hope you're doing great.


In this tutorial, we will look into ServiceNow custom action in flow designer. This is the third chapter of the ServiceNow Flow Designer Series.


In this ServiceNow tutorial, we will try to understand

  • What is ServiceNow flow Designer
  • What is Actions in Servicenow flow designer
  • What is custom action in ServiceNow flow designer
  • What are the advantages of ServiceNow Custom action in flow designer
  • How we can create Servicenow custom action in flow designer
  • How we can test Servicenow custom action in flow designer
  • Demo examples of Servicenow flow designer custom action

Let's first try to understand what is ServiceNow Flow designer Actions

  • Actions can be added to any flow, enabling process analysts to automate Now Platform features without having to write code.
  • An action is a reusable operation that enables process analysts to automate Now Platform features without having to write code.
  • For example, the Create Record action allows process analysts to generate records in a particular table with particular values when certain conditions occur.
  • ServiceNow core actions like Create Record require some familiarity with Now Platform tables and fields. Action designers can create application-specific actions to pre-set configuration details.
  • For example, creating a Create Incident Task action ensures that the process analyst uses the correct table and field configuration each time the action is used. You can add application-specific actions by activating the associated spoke.
  • In Flow Designer, a process analyst adds actions to a flow and defines the configuration options.

 

ServiceNow Core actions

  • A ServiceNow core action is a ServiceNow-provided action available to any flow that cannot be viewed or edited from the Action Designer design environment.
  • For example, the Ask for Approval action is a ServiceNow core action that allows process analysts to use Now Platform approvals.
  • Flow Designer provides a set of ServiceNow core actions to automate Now Platform processes. You can add application-specific ServiceNow core actions by activating the associated spoke.

Custom actions

  • Using a core action enables the process analyst to configure the desired behavior within the flow.
  • To create an action with a pre-set configuration, or to define custom configuration options, a subject matter expert can create a custom action in Action Designer.

 

Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.

 

Regards,

Amit Gujarathi

Technomonk Youtube 

Amit Gujarathi Linkedin 

TheTechnomonk.com 

ServiceNow Community Amit Gujarathi 

Comments
amol_joshi
Tera Contributor

I have this script in the action - 

(function execute(inputs, outputs) {
// ... code ...
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group.name',inputs.parameter);
gr.query();
var contactsArray = [];
var i = 0;

while(gr.next()){
var contactObject = {};
contactObject.email_address = gr.user.email;
contactsArray[i] = contactObject;
i += 1;
}
outputs.usrarray = contactsArray;

)(inputs, outputs);

I have a string input to the action and an array.object as an output.

However, when I try to use this action in a flow and pass the name of a group into the action input variable, it does not generate an output object at all.

Any hints?
amol_joshi
Tera Contributor

amol_joshi_0-1713871445224.png

This is all I get in the action output. I can not get the object with an email address to choose from.

Version history
Last update:
‎11-24-2022 12:47 AM
Updated by:
Contributors