Triggers

  • Release version: Yokohama
  • Updated January 30, 2025
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Triggers

    Triggers in ServiceNow Playbooks specify when to start running a playbook by defining event types and conditions that activate the playbook. When creating a playbook in Workflow Studio, you begin by adding a trigger that sets its type and firing conditions, ensuring the playbook aligns with your business process requirements. If the default triggers do not meet your needs, you have the option to create custom trigger definitions.

    Show full answer Show less

    Trigger Types

    Triggers are based on record operations within the ServiceNow AI Platform and include the following default types:

    • Record Created: Fires when a user creates a record.
    • Record Updated: Fires when a user updates an existing record.
    • Record Created or Updated: Fires on both creation and update of records.

    Note that triggers only fire for interactive, user-initiated record operations, excluding non-interactive sessions.

    Configuring Conditions and Options

    After adding a trigger, you refine when and how it fires by setting conditions and choosing execution options:

    • Conditions: Use the condition builder to specify field-based conditions that must be met.
    • Run my process: Select from options determining frequency of triggering, such as once per record, for each unique change, only if not currently running, or for every update.
    • Run on extended: Enable triggering on tables that extend from the selected table, broadening the scope of the trigger.

    Be aware that using "For each unique change" can cause recursion in non-interactive sessions if the playbook modifies the trigger record.

    Design Considerations

    • Create unique filter conditions for playbooks triggered on the same table to avoid conflicts and unpredictable execution order.
    • Avoid duplicating triggers that are also used in Workflow Studio flows, as both can run simultaneously when conditions match.
    • Triggers ignore records added or updated through import sets or update sets, focusing only on individual user-initiated record operations.

    Practical Use for ServiceNow Customers

    By effectively configuring triggers, you can automate playbook execution precisely aligned with your business events and workflows, improving process consistency and reducing manual intervention. Understanding trigger types, conditions, and design best practices ensures your playbooks run efficiently without conflicts or unintended recursions.

    To implement triggers, start by defining the trigger type and conditions in your playbook, either using default options or creating custom trigger definitions as needed.

    Triggers specify when to start running your playbook.

    In Playbooks, triggers indicate when your playbook should start running. Each trigger has a type and conditions that, when met, start running your activated playbook.

    You can choose a trigger when you create a playbook in Workflow Studio. Start by adding a trigger, which defines the trigger type. Then, set conditions and other options to refine your trigger so that it fires in a way that makes sense for your business process. For more information, see Create a process definition.

    If there are no triggers that fit your use case, you can create your own trigger definition instead. For more information, see Create a trigger definition.

    Figure 1. How triggers work
    When the conditions specified in your trigger are met anywhere in the ServiceNow AI Platform, your automated playbook starts running.

    Trigger types

    In your Trigger Definition [sys_pd_trigger_definition] record, you can choose a trigger type, which determines when your trigger fires. These trigger types represent record operations that can occur in the ServiceNow AI Platform®. The following trigger types are available in your instance by default:

    Record Created
    The playbook runs when a user creates a record anywhere in the ServiceNow AI Platform.
    Record Updated
    The playbook runs when a user updates an existing record anywhere in the ServiceNow AI Platform.
    Record Created or Updated
    The playbook runs when a user creates a record or updates an existing record anywhere in the ServiceNow AI Platform.
    Note:
    Triggers only fire for record operations that are interactive, or made by users. Triggers don't fire for non-interactive record operations. For more information, see Non-interactive sessions.

    Conditions to run

    After you add a trigger to your playbook, you can then set conditions and other options that determine when and how your trigger fires.

    Option Action
    Conditions Use the condition builder to create field conditions for when your playbook runs. See Condition builder.
    Run my process Choose an option for when your playbook runs. Options include:
    • Once: Triggers the playbook once for the life of the triggering input record.
    • For each unique change: Triggers the playbook for every unique update to a non-system field even if the flow is currently running. The system stores a history of every change to a record and determines whether the change is unique. For example, if an incident record's State field changes from In Progress to On Hold, the playbook runs. However, if the State field then changes back to In Progress, the playbook doesn't run.
      Note:
      Playbooks that have a trigger that runs For each unique change can produce recursions when run in a non-interactive session. When such playbooks make a change to the trigger record, the change meets the playbook's trigger conditions and causes a recursion.
    • Only if not currently running: Triggers the playbook for every unique change if a process execution is not currently running.
    • For every update: Triggers the playbook every time the input record is updated, regardless of whether there has already been or there currently are any running process executions.
    Run on extended Select this option to trigger the playbook on tables that extend from your selected table. For example, if you enable this option and select the Configuration Item [cmdb_ci] table, your playbook runs when record operations occur on the Server [cmdb_ci_server], Computer [cmdb_ci_computer], and other extended tables. For more information, see Table extension and classes.

    Design considerations

    Refer to these design considerations when working with triggers:
    Create unique filter conditions for record triggers on the same table
    To prevent playbooks from overwriting each other, create unique filter conditions for each playbook that runs on the same table. If multiple playbooks on the same table have the same filter, there is no way to know the order in which the playbooks will run.
    Avoid duplicating triggers used in Workflow Studio flows
    Playbooks triggers do not override Workflow Studio triggers. For both applications, when the trigger conditions are met, the automated processes run.
    Ignore records added or updated by import and update sets
    Record triggers ignore records that were added or updated by applying an update set or importing an XML file. These operations apply to the entire application or table instead of an individual record.