HTTP Error: JSON parameter needs to be valid JSON

Describe the problem/error/question

I am trying to use Gamma.app api to create a doc with their api, Ive copied and pasted the curl from their docs as is and I am only going to add in the Inputtext (prompt) that generates the proposal into the JSON. Problem is that it seems to tell me it’s not valid, can I please get a second pair of eyes on this maybe I am missing something.

Problem is this isnt the first time ive received this error, got it ealier today in a different workflow so I am seeing a pattern.

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

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

Hey @BrandonRamugondo hope all is well. Welcome to the community.

You could try to use the following JSON in the HTTP Request body:

{
  "textMode": "generate",
  "format": "presentation",
  "numCards": "10",
  "cardSplit": "auto",
  "textOptions": {
    "amount": "medium",
    "language": "en"
  },
  "imageOptions": {
    "source": "aiGenerated"
  },
  "inputText": {{ $json.proposal.toJsonString() }}
}

or, if that doesn’t work, share you input to the HTTP request node (you can use data pinning).

Thanks for the reply and welcoming. Here is the Input that goes into the HTTP node. I tried your suggestion but it still returned the same error.

Sadly your post was caught in the filter, could you try to submit it again?

1 Like