Skip to main content
Version: 1.4.x

Triggering Workflow

Once you've published the workflow using your Engagespot Console, it can be trigger using the send notification API itself. You just need to specify the workflow identifier (which you can see on your dashboard).

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

client.send({
notification: {
workflow: {
identifier: 'workflowIdentifier',
cancellationKey: 'yourUniqueCancellationKey',
},
},
sendTo: {
recipients: ['your-users-unique-identifier'],
},
});

Inline identification of users

info

It is possible to create the users inline during a workflow trigger. Thus you can avoid creating the user beforehand. Read guide