Skip to main content
Version: Next

NotificationProcessor.preProcess()

Home > @backstage/plugin-notifications-node > NotificationProcessor > preProcess

Pre-process notification before sending it to Backstage UI.

Can be used to send the notification to external services or to decorate the notification with additional information. The notification is saved to database and sent to Backstage UI after all pre-process functions have run. The notification options passed here are already processed by processOptions functionality.

preProcess functions are called for each notification recipient individually or once for broadcast notification BEFORE the notification has been sent to the Backstage UI.

Signature:

preProcess?(notification: Notification, options: NotificationSendOptions): Promise<Notification>;

Parameters

ParameterTypeDescription
notificationNotificationThe notification to send
optionsNotificationSendOptionsThe options to send the notification

Returns:

Promise<Notification>

The same notification or a modified version of it