---
sourceDocument: Xanadu ServiceNow AI Platform Capabilities
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/servicenow-platform

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Create custom activities using custom activity designer templates

# Create custom activities using custom activity designer templates {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

You can create and update different types of custom activities in the Workflow Editor
using a custom template.

## Before you begin

Roles required: workflow_admin or activity_creator

## About this task

The Activity Designer contains common steps which are applicable to all the
activities that you create. This procedure guides you through the common steps and
the order they should be set up. You specify an activity template before you create
a custom activity.

## Procedure

1. Navigate to AllOrchestrationWorkflow Editor.  
   The Welcome tab of the Workflow Editor opens.
2. On the Custom tab in the palette, click + to create a new activity select the appropriate [template](https://www.servicenow.com/docs/K7kDpR2CFgmmszfqGjOSeA "Orchestration provides customizable activity templates to create and manage custom activities in the Workflow Editor.") from the list.  
   The Activity Designer form appears, with a stage indicator at the top. All new activities start at the General stage. The current stage shows with a blue underscore. Figure 1. Activity designer stage indicator   
   ![Activity designer stage indicator]()  
3. Add the [general properties](https://www.servicenow.com/docs/access?context=General-Flds-Templates&version=xanadu&pubname=xanadu-integrate-applications&ft:locale=en-US).  
   This information is standard for each custom activity, include a name, description, and other related information.
4. Create the template [Create input variables](https://www.servicenow.com/docs/access?context=CreateInputVariables&version=xanadu&pubname=xanadu-integrate-applications&ft:locale=en-US) for the template.  
   Create the variables to pass into the activity in the Inputs form of the activity designer.
5. **Optional:** Add a [pre-processing script](https://www.servicenow.com/docs/8zDBpr9JqNNExYcw1BFdAg "Use the Pre Processing form of the activity designer to define a script to run before the activity executes.").  
   For input validation or transforming input data, you might need a pre-processing script.  
   Note:  
   This step is not included in the Run Script activity.
6. Click Continue to open the Execution Command form, then fill out the Execution Command step based on the corresponding execution templates:  
   * [Create a SOAP web service activity](https://www.servicenow.com/docs/L5IctMJyLXzIyr50X7T2ZQ "Use this template to create a custom SOAP activity.")
   * [Create a JDBC activity](https://www.servicenow.com/docs/qIRajejwyxkmA8eV4ap1SQ#t_CreateAJDBCActivity "Create a custom JDBC activity to automate SQL commands and stored procedure calls to relational databases from workflow.")
   * [Create a JavaScript Probe activity](https://www.servicenow.com/docs/jU7HApplh7kgRImEp9b8Hg#t_CreateAJavaScriptProbeActivity "Create a JavaScript Probe activity to instruct a MID server to execute server-side javascript.")
   * [Create a PowerShell activity](https://www.servicenow.com/docs/oAolWpEQT5ymp6SHGQR4GQ#t_CreateAPowershellActivity "Create a custom PowerShell activity return data to a workflow from a host using Microsoft PowerShell.")
   * [Create a REST web service activity](https://www.servicenow.com/docs/iqsRjaW3Qs50I8ueWQUxwg#t_CreateARESTWebServiceActivity "Use this procedure to create a custom REST web service Orchestration activity.")
   * [Create a Probe activity](https://www.servicenow.com/docs/UGf4AoeQoQXsNF_xWbe1Zg#t_CreateAProbeActivity "Create an activity that runs a probe on the target host that is configured to return specific information..")
   * [Create an SFTP activity](https://www.servicenow.com/docs/e1JCoDd0zQYCBjuVxvwC6w#t_CreateAnSFTPActivity "Create an activity that executes basic SFTP commands on a remote server.")
   * [Create a Run Script activity](https://www.servicenow.com/docs/Z5G_gMHBxhS1SafUjXFYHg#t_CreateARunScriptActivity "Create an activity that runs any script.")
   * [Create an SSH activity](https://www.servicenow.com/docs/5FIeqwpAyjbaUXaalc0n5w#t_CreateAnSSHActivity "Create an activity that extracts data from a target host that uses the SSH network protocol.")
   * [Create a JMS activity](https://www.servicenow.com/docs/o7OldZK5kuFzv8OJCIqdjQ#t_CreateAJMSActivity "Create a custom JMS activity to retrieve or send messages to external systems using the Java Messaging Service.")
   {#create-custom-activities__ul_dcm_mzh_2y}
7. **Optional:** [Test your
   inputs](https://www.servicenow.com/docs/7S~gZj0OR5hh_kpDalWacQ#test-template-inputs "You can test the input parameters of a custom activity during its development without having to run the activity in a workflow context.").
8. **Optional:** In the Outputs form, define local and/or output variables.  
   Local variables can be used for temporary storage when cascading parsing rules. For example, you might extract an XML payload from within a JSON payload. A local variable can access the XML document and use that as a source for another parsing rule. The graphic shows a <var class="keyword varname">Local1</var> variable source to parse data for <var class="keyword varname">Output2</var>.  
   Figure 2. Define local variable
9. Use one of the options to assign values to Outputs.

   | Option | Description |
   | Parsing rule | You can create a parsing rule and map them to the output fields by dragging and dropping the variables into the [parsing rules](https://www.servicenow.com/docs/yuXlPHGwUxbemWJ0MfbuTA#t_CreateAParsingRule "Populate output variables defined in a custom activity with payload data returned from an inputs test on an external host or endpoint.") structure. The REST, SOAP, and JDBC templates provide auto-mapping to create the parsing rules automatically. If available from the test inputs form, auto-mapping should be used when possible. |
   | [Post-processing](https://www.servicenow.com/docs/yuXlPHGwUxbemWJ0MfbuTA#r_ActivityDesignerParsingSources "This table lists the parsing sources available with each execution template.") | Post-processing scripts allow you to code your own output data validation, output parsing code, and related tasks. Post-processing executes after the execution command results have been returned and before the parsing rules and conditions are run. Click Go to Post-Processing (Advanced) to create a post-processing script. Note: If you create a script, this step reflects as a stage in the indicator. |
   |-|-|

   {#create-custom-activities__choicetable_lh4_h3j_4y}
10. Click Continue to open the [Conditions](https://www.servicenow.com/docs/access?context=conditions&version=xanadu&pubname=xanadu-integrate-applications&ft:locale=en-US) form to create exit condition rules for your activity and then click Save.
* **[General properties for activity designer templates](https://www.servicenow.com/docs/KnSXy34KdIABLvblO5~y6A)**   
  The following General Property fields are common to all activity designer templates.
* **[Create input variables](https://www.servicenow.com/docs/7S~gZj0OR5hh_kpDalWacQ#CreateInputVariables)**   
  Create the variables to pass into the activity in the Inputs form of the activity designer.
* **[Data encryption for activity variables](https://www.servicenow.com/docs/IKKfZx906OBWl_RweXYaEg)**   
  You can protect sensitive data passed from Orchestration activities by encrypting input and output variables.
* **[Activity designer template pre-processing fields](https://www.servicenow.com/docs/8zDBpr9JqNNExYcw1BFdAg)**   
  Use the Pre Processing form of the activity designer to define a script to run before the activity executes.
* **[Template post-processing fields](https://www.servicenow.com/docs/BrPMZKz0XKtFhOZ9x29m_Q)**   
  From the Post Processing form in the activity designer you can define a script to run after the activity executes.
* **[Auto-map activity output variables](https://www.servicenow.com/docs/Txbr8atoZqeLQC4L3tRcnQ)**   
  You can map parameter values in a test payload to variables in the Outputs tab automatically.
* **[Create an output variable](https://www.servicenow.com/docs/Ho1iM6cCL_kADFmneFndQA#t_CreateAnOutputVariable)**   
  The Outputs form in the designer contains a variable builder for creating data structures of objects and arrays.
* **[Create a parsing rule](https://www.servicenow.com/docs/yuXlPHGwUxbemWJ0MfbuTA#t_CreateAParsingRule)**   
  Populate output variables defined in a custom activity with payload data returned from an inputs test on an external host or endpoint.
* **[Activity conditions](https://www.servicenow.com/docs/vpyPNwgGUtTHVTqPGEbKIw)**   
  Create the exit conditions for your activity in the Condition column and set the order for each..

*[\>]: and then


