Send Notification

Action ID: notification:send
NPM Package:

@backstage/plugin-scaffolder-backend-module-notifications

Description

Sends a notification using NotificationService

Input Schema

PropertyTypeDescriptionRequired
infostring-
linkstring-
scopestring-
titlestring-
topicstring-
optionalboolean-
severitystring-
entityRefsarray-
recipientsstring-

Output Schema

No output schema defined for this action.

Usage Examples

Broadcast a success message after publishing a new service

Sends a broadcast notification after fetch:template, publish:github, and catalog:register. Use this to inform the organization that a new service was created.

Copy
steps:
  - id: fetch
    action: fetch:template
    input:
      url: ./skeleton

  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=acme&repo=${{ parameters.name }}
      defaultBranch: main
      description: ${{ parameters.description }}

  - id: register
    action: catalog:register
    input:
      repoContentsUrl: ${{ steps.publish.outputs.repoContentsUrl }}
      catalogInfoPath: /catalog-info.yaml

  - id: notify
    action: notification:send
    input:
      recipients: broadcast
      title: New service scaffolded
      info: Service ${{ parameters.name }} was created by ${{ user.entityRef }} and registered in the catalog
      link: ${{ steps.publish.outputs.remoteUrl }}
      severity: normal
      topic: scaffolder:new-service
      scope: org:engineering
      optional: true

Notify the owners of the newly registered entity to review

Targets the created catalog entity’s owners using its entityRef from catalog:register. Use this to request a quick review after registration.

Copy
steps:
  - id: fetch
    action: fetch:template
    input:
      url: ./service-template

  - id: register
    action: catalog:register
    input:
      repoContentsUrl: ${{ parameters.repoContentsUrl }}
      catalogInfoPath: /catalog-info.yaml

  - id: notify-owners
    action: notification:send
    input:
      recipients: entity
      entityRefs:
        - ${{ steps.register.outputs.entityRef }}
      title: Review your new service in the catalog
      info: Please verify metadata and ownership for ${{ parameters.name }}
      link: https://backstage.example.com/catalog/${{ steps.register.outputs.entityRef }}
      severity: high
      topic: scaffolder:review

Sends an entity-targeted notification to several services affected by a shared library change. Use when your template updates a platform library and consumers need to take action.

Copy
steps:
  - id: fetch
    action: fetch:template
    input:
      url: ./shared-lib-update

  - id: notify-consumers
    action: notification:send
    input:
      recipients: entity
      entityRefs:
        - component:default/payment-service
        - component:default/billing-api
      title: Shared library upgraded to v2.1.0
      info: A new version of acme-shared-lib is available; confirm compatibility and bump as needed
      link: https://git.example.com/acme/shared-lib/-/releases/v2.1.0
      severity: normal
      topic: platform:shared-lib
      scope: group:default/platform

Scoped broadcast to a specific team with topic and low severity

Broadcasts a low-priority heads-up to a specific group after publish:github. Use this for non-urgent updates targeted to one team.

Copy
steps:
  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=acme-internal&repo=${{ parameters.name }}
      defaultBranch: main
      description: ${{ parameters.description }}

  - id: notify-team
    action: notification:send
    input:
      recipients: broadcast
      title: Template baseline applied
      info: The latest golden path updates were applied to ${{ parameters.name }}
      link: ${{ steps.publish.outputs.remoteUrl }}
      severity: low
      topic: scaffolder:golden-path
      scope: group:default/platform
      optional: true

Critical alert to entity owners when an urgent change is requested

Sends a critical notification to the owners of the new entity when a template parameter indicates urgency. Use this when immediate attention is required.

Copy
steps:
  - id: register
    action: catalog:register
    input:
      catalogInfoUrl: https://raw.githubusercontent.com/acme/${{ parameters.name }}/main/catalog-info.yaml

  - id: notify-critical
    action: notification:send
    input:
      recipients: entity
      entityRefs:
        - ${{ steps.register.outputs.entityRef }}
      title: Immediate action required for ${{ parameters.name }}
      info: An urgent change was requested during scaffolding; please review and acknowledge
      link: https://backstage.example.com/catalog/${{ steps.register.outputs.entityRef }}
      severity: critical
      topic: scaffolder:urgent-change