Notifications
Some generative tools may require several minutes to complete processing, which can negatively impact the user experience. To improve usability, this feature allows users to close the tool and receive a notification once the generation is complete.
Enabling Notifications
To enable notifications for your task, make sure notifications are enabled for the task in your worker's configuration. Refer to Task Registration page for details on how to configure this.
Notifications options
An optional notification object can be passed when submitting a task via the Async API:
"notification": {
"projectId": "...",
"miniappPackageId": "...",
"actions": [{
"deeplink": "...",
"mobileDeeplink": "..."
}]
}
projectId- the ID of the project from which the task was triggeredminiappPackageId- the ID of the miniapp from which the task was triggeredactions- call-to-action (CTA) deeplinks
The deeplink(s) specified in the actions will be updated by the backend to include the task_id as a query parameter,
enabling the miniapp to correctly restore its state.
Dynamic Notifications
Static notification config may not always be sufficient — you may want to tailor the notification title, description, or CTA label based on the request, error, or any other context available during execution.
You can override notification content at runtime from within your executor using flow.meta().configureNotification(). Dynamic overrides take precedence over the static application.yaml config.
flow.meta().configureNotification({
title: "Your images are ready",
description: `Generated ${result.count} images`,
});
Requires pluggable-worker-core version 6.16.0 or higher.
All fields are optional — only specify the ones you want to override. Unset fields fall back to the static config.
| Field | Used When | Description |
|---|---|---|
title | Task succeeded | Notification title |
description | Task succeeded | Notification description |
cta_label | Task succeeded | Call-to-action button text |
error_title | Task failed | Notification title on failure |
error_description | Task failed | Notification description on failure |
error_cta_label | Task failed | Call-to-action button text on failure |