@novu/framework
import { workflow } from '@novu/framework'; const myWorkflow = workflow('new-signup', async ({ step, payload }) => { await step.email('send-email', () => { return { subject: 'Hello World', // The payload object here is type-safe body: `Hi ${payload.name}, welcome to our platform!` } }); }, { // JSON Schema for validation and type-safety. Zod, and others coming soon. // https://json-schema.org/draft-07/json-schema-release-notes payloadSchema: { properties: { name: { type: 'string' }}}, });
Was this page helpful?