[Instantly.ai] "error": "JSON parameter needs to be valid JSON"

I’ve been trying for days to get an http v2 API node to send a single lead into Instantly.ai. I have the auth working but no matter what i try to send the body i get the error: json parameter needs to be valid json. I’ve tried sending as raw, using stringify, just sending as a json expression, parameters and i just can’t get past it. I was able to get a cURL request using the same data from terminal to work. I even tried importing that same cURL into the node thinking that would certainly build the node the right way, but no no love. I’ve been through all their dev resources for the v2 app and chat gpt5.0 and Perplexity haven’t been able to help after well over 100 queries.

I would appreciate any help from anyone who’s worked iwth instantly!

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

Hi @Craig_H,

The error message is quite descriptive: JSON parameter needs to be valid JSON
You can try usingJSON.stringify() or .toJsonString()

If you’d like, share the node that’s causing the error so I can help you debug it..

To break it down I’ve simplified the json to just include this:

{{
JSON.stringify({
“email”: $json.Email || “[email protected]”,
“campaign_id”: “0961409f-df0c-458e-b747-53977b78****”
})
}}

I’m sending as raw body content and then the json as an expression… Thank you!

@Craig_H what’s the endpoint you’re using?

If this is the endpoint you’re refering to

then you can try use this

2 Likes

https://api.instantly.ai/api/v2/leads

Thank you so much! Using the “Fields” dropdown with values worked! I can’t believe it. I’ve been trying to send this as json and raw values to no avail -endlessly trying different variations, looking at all the Instantly.ai dev documents. This worked!

@mohamed3nan Thanks again! Please DM me if you are interested in some freelance n8n automation work!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.