Skip to main content
Version: 1.4.x

Sending Templated Notification

caution

We're deprecating the Templates feature. You will no longer be able to create new ones. Instead, you should create workflows. Read the workflow documentation here

Once you've created the template using your Engagespot Console, it can be sent using the send notification API itself. You just need to specify the templateId (which you can see on your dashboard), and the key value pairs for the placeholders that you want to be replaced in your template.

const { EngagespotClient } = require('@engagespot/node');
const client = EngagespotClient({
apiKey: 'YOUR_ENGAGESPOT_API_KEY',
apiSecret: 'YOUR_ENGAGESPOT_API_SECRET',
});

client.send({
notification: {
templateId: 483561,
},
recipients: ['<your-users-unique-identifier>'],
});