sendinblue / APIv3-nodejs-library

SendinBlue's API v3 Node.js Library
ISC License
101 stars 47 forks source link

sendSmtpEmail.tags results in both "tag" and "tags" being passed in webhook #92

Closed HaydenMacDonald closed 3 years ago

HaydenMacDonald commented 3 years ago

Hi,

I am using this API and a SendInBlue webhook to forward events to a MySQL db. When transactional emails are tagged using sendSmtpEmail.tags (via an array of strings), the webhook returns an event that has both tag and tags.

// Configure tag
    let tags = { 
      "subject": 1,
      "theme": "light",
      "greeting": 1,
      "image": 1,
      "phrase": 1
    };

// Assign stringified tags object in array to tags property
sendSmtpEmail.tags = [ JSON.stringify(tags) ];

webhook-tags-twice

I want to just receive the tags array. Is there something I can do to prevent tag from being passed by the webhook?

shubhamUpadhyayInBlue commented 3 years ago

Hey @HaydenMacDonald

I just checked it with the concerned team and it is expected behavior from our end to send both the tag and tags in the webhook payload.

If you have any further queries on this you can raise a support ticket from your Sendinblue account. Since it is not an issue in the NodeJS wrapper, I am closing it.