drip-nodejs
drip-nodejs copied to clipboard
Cannot create tags with a subscriber
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:
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