drip-nodejs icon indicating copy to clipboard operation
drip-nodejs copied to clipboard

Cannot create tags with a subscriber

Open noctivityinc opened this issue 5 years ago • 1 comments

Two issues here. If you try to post an array of tags when creating/updating a subscriber as per the docs:

req.body [Object: null prototype] {
  email: '[email protected]',
  tags: '["tag1", "tag2"]'
}

then it passes an array of an array:

"tags": [
   "[\"tag1\", \"tag2\"]"
],

however, even if I fix this and just pass just a comma string:

"tags": [
    "\"tag1\",\"tag2\""
 ],

Drip still stores it like this:

Screen Shot 2020-05-01 at 9 04 44 AM

noctivityinc avatar May 01 '20 13:05 noctivityinc

Figured it out, though not sure why it matters. I needed to use js to split the actual request:

tags: req.body.tags.split(',')

even though the output is the same it only works this way

noctivityinc avatar May 01 '20 13:05 noctivityinc