Hi So about message tracking in nylas node sdk 6.11.1

So I’m using nylas version 2.3.0 in dashboard app and my node js sdk is 6.11.1 and what I want to do is I want to add webhook for email tracking like when its opened and replied to thread I have setup webhook for that with triggers in dashboard and i have code const tracking = {
“opens”: true,
“links”: false,
“thread_replies”: false,
“payload”: “Use this string to describe the message you’re enabling tracking for. It’s included in webhook notifications about tracked events.”
}
const draft = await nylas.drafts.build({
subject,
to,
cc,
bcc,
files: nylasFiles,
body: body.body + emailSignature || ‘’,
tracking,
});
const message = await draft.send();

his too in my node js but its only triggering message.created webhook not any other is its not available in this sdk version or nylas api version or i’m making mistake? node version - 16.9.1. I can’t find document for setting this up in this version and I cant use v3 its old project so.

Hey @Dhruval, how are you? I hope you are well.
In this link (Nylas API v2.7 | Nylas Docs), clicking on Node SDK, you can see that the correct way to save tracking options in draft is draft.save({ ...trackingOptions });

And here, you can see the function send including the trackingArg parameter.
Link to Nylas Node SDK - Version 6.11.1

1 Like