Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import { workflow } from "@novu/framework";
const myWorkflow = workflow("general-notification", execute, {
preferences: {
all: { enabled: true, readOnly: false },
},
});
const emailOnlyWorkflow = workflow("weekly-report", execute, {
preferences: {
all: { enabled: false },
channels: {
email: { enabled: true },
},
},
});
const securityAlertWorkflow = workflow("security-alert", execute, {
preferences: {
all: { enabled: true, readOnly: true },
},
});
const orderUpdateWorkflow = workflow("order-update", execute, {
preferences: {
all: { enabled: true, readOnly: false },
channels: {
email: { enabled: true },
sms: { enabled: false }, // off by default, subscriber can enable
push: { enabled: true },
chat: { enabled: false },
inApp: { enabled: true },
},
},
});
const commentWorkflow = workflow("new-comment", execute, {
preferences: {
all: { enabled: false },
channels: {
email: { enabled: true },
inApp: { enabled: true },
},
},
});
const optInWorkflow = workflow("beta-updates", execute, {
preferences: {
all: { enabled: false, readOnly: false },
},
});
Was this page helpful?