import {
Novu
} from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');
await novu.subscribers.trigger("workflowIdentifier", {
to: "subscriberId",
payload: {},
overrides: {
email: {
customData: {
// mailersend template templateId
templateId: 'mailersend-template-id',
// mailersend template variables
personalization: [{
email: 'recipient@email.com',
data: {
items: {
price: '',
product: '',
quantity: '',
},
order: {
date: '',
order_number: '',
billing_address: '',
customer_message: '',
},
store: {
name: '',
},
invoice: {
total: '',
subtotal: '',
pay_method: '',
},
customer: {
name: '',
email: '',
phone: '',
},
},
}, ],
},
}
},
// actorId is subscriberId of actor
actor: "actorId"
tenant: "tenantIdentifier"
});