@servicenow/sdk - v4.9.0
    Preparing search index...

    Function EmailNotification

    • Creates an email notification configuration for ServiceNow. Email notifications are automated messages sent to users when specific conditions are met, such as record updates, insertions, or system events.

      This API allows you to define notifications with trigger conditions, recipient targeting, email content, and digest options. Notifications can be triggered by database operations (insert/update), system events, or manual execution.

      Type Parameters

      Parameters

      Returns { $id: string | number | ExplicitKey<string> } & {
          protectionPolicy?: "read" | "protected";
      } & OverrideProperties & {
          active?: boolean;
          category?: string
          | Record<"sys_notification_category">;
          description?: string;
          digest?: Digest;
          emailContent?: EmailContent;
          enableDynamicTranslation?: boolean;
          mandatory?: boolean;
          name?: string;
          notificationType?: "email" | "vcalendar";
          recipientDetails?: RecipientDetails;
          table: T;
          triggerConditions?: TriggerConditions<T>;
      } & TableBrand<"sysevent_email_action">

      • OptionalprotectionPolicy?: "read" | "protected"

        Controls edit/view access for other developers after the application is installed.

        • read: Others can see the script logic but not change it.
        • protected: Others cannot change this record.
        • Omit to allow other developers to customize this record.
      • Optionalactive?: boolean

        Whether the notification is active and will be sent

        true
        
      • Optionalcategory?: string | Record<"sys_notification_category">

        Category for organizing and managing notifications

        'c97d83137f4432005f58108c3ffa917a' (Default email category)
        
      • Optionaldescription?: string

        Description of the email notification

      • Optionaldigest?: Digest

        Digest configuration for batching multiple notifications

      • OptionalemailContent?: EmailContent

        Email content and formatting options

      • OptionalenableDynamicTranslation?: boolean

        Whether to enable dynamic translation of notification content

        false
        
      • Optionalmandatory?: boolean

        Whether the notification is mandatory and cannot be unsubscribed from

        false
        
      • Optionalname?: string

        Name of the email notification

      • OptionalnotificationType?: "email" | "vcalendar"

        Type of notification: email or calendar invite (vcalendar)

        'email'
        
      • OptionalrecipientDetails?: RecipientDetails

        Configuration for who receives the notification

      • table: T

        The table that this notification applies to (required)

      • OptionaltriggerConditions?: TriggerConditions<T>

        Conditions that determine when the notification is triggered