skills/trigger-notification/SKILL.md
Trigger Novu notification workflows to send messages across email, SMS, push, chat, and in-app channels. Supports single triggers, bulk triggers, broadcast to all subscribers, topic-based targeting, and cancellation. Use when sending transactional notifications, alerts, or any event-driven messages.
npx skillsauth add novuhq/skills novu-trigger-notificationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Send notifications by triggering Novu workflows. Supports single, bulk, broadcast, and topic-based delivery.
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: process.env.NOVU_SECRET_KEY,
});
Send a notification to one subscriber:
const result = await novu.trigger({
workflowId: "welcome-email",
to: "subscriber-123",
payload: {
userName: "Jane",
activationLink: "https://app.example.com/activate",
},
});
If the subscriber doesn't exist yet, provide the full object — Novu upserts the subscriber:
const result = await novu.trigger({
workflowId: "welcome-email",
to: {
subscriberId: "user-456",
email: "[email protected]",
firstName: "Jane",
lastName: "Doe",
},
payload: { userName: "Jane" },
});
Use custom transactionId for idempotency:
const result = await novu.trigger({
workflowId: "order-update",
to: "subscriber-123",
payload: { orderId: "order-789" },
transactionId: "unique-tx-id-abc",
});
Send up to 100 events in a single request:
const result = await novu.triggerBulk({
events: [
{
workflowId: "welcome-email",
to: "subscriber-1",
payload: { userName: "Alice" },
},
{
workflowId: "welcome-email",
to: "subscriber-2",
payload: { userName: "Bob" },
},
],
});
Send to all subscribers in the environment:
const result = await novu.triggerBroadcast({
// here name field is for workflowId
name: "system-announcement",
payload: {
message: "Scheduled maintenance at 2am UTC",
},
});
Send to all subscribers in a topic:
const result = await novu.trigger({
workflowId: "project-update",
to: [{
type: "Topic",
topicKey: "project-alpha-watchers",
}],
payload: { update: "New release deployed" },
});
Cancel delayed or digested notifications using the transactionId:
await novu.cancel("unique-tx-id-abc");
| Parameter | Required | Description |
| --- | --- | --- |
| workflowId | Yes | The workflow identifier (not display name) |
| to | Yes | Subscriber ID (string), subscriber object, or topic target |
| payload | No | Data passed to the workflow, validated against payloadSchema |
| overrides | No | Provider-specific overrides per channel |
| transactionId | No | Unique ID for idempotency and cancellation |
| actor | No | Subscriber ID or object representing who triggered the action |
| context | No | Key-value pairs for multi-tenancy / organizational context |
Override provider-specific settings per trigger:
const result = await novu.trigger({
workflowId: "alert",
to: "subscriber-123",
payload: { message: "Server down" },
overrides: {
"providers": {
"sendgrid": {
from: "[email protected]",
cc: ["[email protected]", "[email protected]"],
replyTo: "[email protected]",
}
}
},
});
workflowId is the identifier, not the display name — use the identifier you set when defining the workflow, not its human-readable name. Novu creates workflowId automatically if not providedsubscriberId or subscriber object string will create the subscriber with that subscriberId.transactionId is required for cancellation — you cannot cancel a trigger without it. Either provide custom transactionId or store novu generated transactionId if usecase is to cancel the workflow run (trigger event) later.payloadSchema — if the workflow defines a schema, the trigger will fail if the payload doesn't match.testing
Create, update, search, and delete subscribers in Novu. Manage topics for group-based notification targeting. Set subscriber credentials for push and chat channels. Use when managing notification recipients, creating subscriber records, organizing subscribers into topics, or configuring channel-specific credentials.
development
Configure notification preferences in Novu at the workflow and subscriber level. Set default channel preferences (email, SMS, push, chat, in-app), mark preferences as read-only or subscriber-editable, and manage subscriber-specific overrides. Use when setting up notification opt-in/opt-out, configuring per-channel delivery preferences, or building a preferences management UI.
development
Integrate Novu's in-app notification inbox into web applications. Supports React, Next.js, and vanilla JavaScript. Includes the Inbox component (bell icon + notification feed), composable components (Bell, Notifications, InboxContent, Preferences), headless hooks, branded theming, custom render props, multi-tenancy via contexts, tabs, localization, and HMAC security. Use when adding an in-app notification center, bell icon, notification feed, real-time notification updates, or building a personalized and branded notification experience.
tools
Build code-first notification workflows with @novu/framework. Use when defining workflows in TypeScript (Zod / JSON Schema / Class Validator), composing channel steps (email, SMS, push, chat, in-app) with action steps (delay, digest, custom), exposing Step Controls for non-technical teammates, rendering React/Vue/Svelte Email templates, hosting the Bridge Endpoint inside Next.js, Express, NestJS, Remix, Nuxt, SvelteKit, H3, or AWS Lambda, syncing to Novu Cloud via CLI / GitHub Actions, securing production with HMAC, or implementing translations, hydration, multi-channel orchestration, and LLM-powered notification logic in code.