This got marked as spam last time I tried to post, not sure why...
Mailchimp allows batch operations, allowing you to complete multiple operations with a single call. Helpful when dealing with hundreds/thousands of records. The format of the JSON is causing me a headache though. This is what it needs to look like (confirmed working in postman)-
{
"operations":
[
{
"method":"POST",
"path": "/lists/f8b596c66e/members/",
"body":"{
\"email_address\": \"test1@gmail.com\",
\"status\": \"subscribed\",
\"merge_fields\": {
\"FNAME\": \"Test\",
\"LNAME\": \"One\",
\"ADDRESS\": {
\"addr1\": \"1122 Rad Dr\",
\"addr2\": \"\",
\"city\": \"Toledo\",
\"state\": \"OH\",
\"zip\": \"12345\",
\"country\": \"US\"
},
\"PHONE\": \"1233047645\",
\"COMMERCIAL\": 1,
\"SALUTE\": \"Dear Dan\",
\"SOURCE\": \"CR\",
\"ACQUIRED\": \"2019-01-01\",
\"ARBAL\": \"\",
\"RAU\": \"\",
\"EXPIRES\": \"2019-07-01\",
\"SECONDARYP\": \"1236996491\",
\"CUSTID\": \"12345\",
\"LOCATION\": \"1\"
}
}
"},
{
"method":"POST",
"path": "/lists/f8b596c66e/members/",
"body":"{
\"email_address\": \"dan@tech.com\",
\"status\": \"subscribed\",
\"merge_fields\": {
\"FNAME\": \"Dan\",
\"LNAME\": \"I\",
\"ADDRESS\": {
\"addr1\": \"12 Road\",
\"addr2\": \"\",
\"city\": \"Toledo\",
\"state\": \"OH\",
\"zip\": \"12345\",
\"country\": \"US\"
},
\"PHONE\": \"1233047645\",
\"COMMERCIAL\": 1,
\"SALUTE\": \"Dear Dan\",
\"SOURCE\": \"CR\",
\"ACQUIRED\": \"2019-01-01\",
\"ARBAL\": \"\",
\"RAU\": \"\",
\"EXPIRES\": \"2019-07-01\",
\"SECONDARYP\": \"1236996491\",
\"CUSTID\": \"12345\",
\"LOCATION\": \"1\"
}
}
"}
]
}Looks fun, right?
My problem is that it's adding quotes around part of the JSON I've generated
Relevant part of the flow (if it's not large enough- https://i.imgur.com/tuenGFS.png )-
The Input for Generate Record is a solid block to avoid it adding \n \t in later compose operations.
It also will not accept it as valid JSON without the whole thing inside single quotes, hence the compose action to remove those.
The ouput from Compose 3 is what I need, I just need to stick this inside the main operations object without it adding the double quotes
No matter how I try to do that, it will add double quotes around the entire object array (not each array item), as shown above. Converting it to JSON works, but that strips all the escaped double-quotes, which breaks it anyways.
Ideas?
Thanks

Report
All responses (
Answers (