Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Create a custom subflow for alerts

You can create a subflow according to your requirements. For example, you can resolve alerts, notify teams, or run remediation actions.

Before you begin

Role required: evt_mgmt_admin, flow_designer

About this task

Copy an existing subflow, and then customize it. Publish the custom subflow so that it is available to be used to resolve any alert. For more information, see Create a subflow.

Note: If your ServiceNow instance uses domain separation, you must ensure that the new custom subflow that you created operates only on the data of the designated domain.

To automate alert responses with an easier interface, you can also create a respond automation in Service Operations Workspace. For more information, see Create Respond automation.

Procedure

  1. Navigate to All > Process Automation > Flow Designer.

  2. In the Flow Designer window, click Subflows.

  3. Click Create Incident.

    The Create Incident subflow opens in Flow Designer in read-only format. The inputs in the Create Incident subflow are described in the following table.

    ValueDescription
    alertRuleNameThe name of the alert management rule that specifies this subflow, for example IDD.
    alertRuleIdThe sys_id of the alert management rule, for example, 1ae122e84f5f1300b28392918110c71e.
    alertGRThe alert record that matches the filter that is defined in the alert management rule, for example, Alert0027931
    executionIdThe ID of the execution to be retrieved, for example, 000182ebdb66630091187f1daf9619d4
    userNameThe current user's name, for example, admin.
    userDisplayNameThe name that the current user specified to be displayed, for example, System Administrator.

    For example, in an alert management rule that has processed alerts, in the Alert Executions area, click the Link to execution of the required alert.

Image omitted: link-to-execution.png
Link to execution
The Flow Designer opens. Click **Subflow Inputs and Outputs**. The input variable names of the subflow are displayed with their respective values.
Image omitted: subflow-parameter-values.png
Subflow variable values
  1. In the subflow header, click more actions
Image omitted: more-actions-icon.png
More actions and select **Copy subflow**.
  1. In the New Subflow Name field, enter the name of the new subflow.

  2. To limit the application scope of the subflow, in the Application field, select the required application, otherwise select Global.

  3. Click Copy.

    The new subflow is created and is opened as a tab in the subflow designer editor. The inputs provided by the template appear.

    Inputs are fixed and cannot be added to.

    In the editor, you can delete subflow inputs or outputs, as required.

  4. To delete an input, click

Image omitted: delete-input-icon.png
Delete input icon.
Inputs are fixed and cannot be added to.
  1. Create subflow outputs by defining the names and data types.

    1. Click
Image omitted: add-input-icon.png
Add new input icon to add output.
2.  Define the name and the data type.
  1. To save the subflow in draft status, click Save.

  2. To save and publish the subflow so that it can be used in the alert management rule designer, click Publish.

Result

Include the modified subflow in an alert management rule to resolve alerts according to your customized requirements.

Parent Topic:Alert management rules for resolving alerts

Related topics

Subflows