Invalid Body Parameter For JSON in HTTP

I am attempting to create and Email personalizer and upload into InstantlyAI.




My issue is in my HTTP Module going to InstantlyAI, i keep getting an “JSON parameter needs to be valid JSON”. The only Module I do not have set as “send Json Output” is my “Format Name Agent”, I have toggled this to send json, then it effects the rest of my Flow. I have left it as it (not sending json from this module). As I have investigated I have ran my payload through an Regex101 Test, it is telling me that my “campaign: Campaign ID” is what could be breaking my Json structure. I know it is not, but my main question would be, if N8N is Java Script essentially (Wrapping/Replacing) in JSON, why would this cause my issue if the campaign ID is hardcoded? I could be way off, but this is Day 2 of troubleshooting and I am running out of resources.

As for my HTTP Module, as a last minute attempt, I have added an Header to “Accept - application/json” I have tried with and with out this header and still have failed. I have also cross referenced all the names of the nodes to match the properties that have been added to my payload. Any Ideas?

Information on your n8n setup

  • n8n version: 1.91.3 (Cloud)
  • Database (default: SQLite):
  • Running n8n via Render

Here is not the valid json.

So you can change the expression to

"personalization":{{ $json.message.content.icebreaker.toJsonString() }},