Updating merge fields in Mailchimp

I am having trouble updating Mailchimp merge fields (ie FNAME, LNAME, PHONE) using the Mailchimp Update Action. I can get the Add Record working no problem.

When I try to add fields in the Update Fields section it only provides option like HTML type, Opt-in IP Address and not the fields I want (ie FNAME, LNAME, PHONE)

By selecting JSON Paramaters, I can add this code
{“FNAME”:{{ $json.body[0].First_Name }}}
{“LNAME”:{{ $json.body[0].Last_Name }}}
{“PHONE”:{{ $json.body[0].Phone_1 }}}

However this fails to update the record.

Any ideas what I’m doing wrong or what is missing?

  • **n8n version: 1.47.1
  • **Database (default: SQLite): default
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): webhook (post), mailchimp update
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): self hosted
  • **Operating system: Ununto 22.04

Thanks, David.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey David,

I’m not 100% familiar with the situation you are referring to, but some quick feedback that might help. Looks like it’s expecting JSON format, but the info you are passing isn’t valid JSON.

Can you try the below instead:

{
"FNAME":{{ $json.body[0].First_Name }},
"LNAME":{{ $json.body[0].Last_Name }},
"PHONE":{{ $json.body[0].Phone_1 }}
}

Hi Jeremy,
I have been exposed as knowing nothing about JSON :woozy_face:

Thanks for correcting the code. However it still isn’t updating the fields in Mailchimp.

REgards, David.

It’s working now. Thanks.