Persistant JSON payload error with Printify draft via HTTP node

Hello,

I’m experiencing a persistent issue when trying to create a Printify product draft from n8n. Despite multiple payload configurations and simplified workflows, I keep getting this error:

pgsql

CopyEdit

NodeOperationError: JSON parameter needs to be valid JSON
Node: HTTP Request (Create Printify Product Draft)
Node version: 4.2
n8n version: 1.91.3 (Cloud)

What I’m Trying to Do:

Send a POST request to https://api.printify.com/v1/shops/{shop_id}/products.json to create a product draft from data prepared in previous workflow steps (Vaultsmith quote + product info).

Minimal Workflow That Still Fails:

  • Manual Trigger
  • Code Node (builds static JSON payload)
  • HTTP Request Node (POST to Printify, Body set to JSON)

Code Node Output (simplified hardcoded test):

json

CopyEdit

{
  "title": "Test Product – Hardcoded",
  "description": "This is a working test description.",
  "blueprint_id": 5,
  "print_provider_id": 99,
  "variants": [
    {
      "id": 17390,
      "price": 1999,
      "is_enabled": true
    }
  ],
  "print_areas": [
    {
      "variant_ids": [17390],
      "placeholders": {
        "front": {
          "images": [
            {
              "id": "
              "x": 0,
              "y": 0,
              "scale": 1,
              "angle": 0
            }
          ],
          "position": "front"
        }
      }
    }
  ]
}

HTTP Node Settings:

  • Method: POST
  • Body Content: JSON
  • Body: {{$json}}
  • Content-Type: application/json
  • Auth: Bearer token (Printify API key)

What I’ve Tried:

  • Building payload via Set node (JSON + expressions).
  • Building payload via Code node (hardcoded + dynamic).
  • Switching between Raw JSON and JSON parameter modes.
  • Wrapping payload in JSON.stringify() and sending as Raw.
  • Isolating this to a 3-node test workflow with no other dependencies.

Result:

All attempts return the same error:
NodeOperationError: JSON parameter needs to be valid JSON
This happens even with fully static, hardcoded payloads.


My Question:

  • Is there a specific way the n8n HTTP Request node needs to be configured to POST a complex JSON payload like this?
  • Could there be a bug in how n8n handles nested arrays/objects in JSON mode?
  • Any working examples of posting complex nested JSON to an API like Printify would be appreciated.

Thank you for your help.


Roland Brandt

Hey @Roland_Brandt hope all is well.

When I try this

I do not get error about JSON parameter needs to be valid JSON, I get authentication error (which happens after json validation). Are does this example work for you if you add your credentials?

Thanks for checking this, Jabbson!

That’s really helpful to know it passes JSON validation on your end. I’ll double‑check my HTTP node authentication again — I’m using Bearer token auth with my Printify API key, but maybe something is off there. I’ll test using manual headers as you suggested and report back.

— Roland

1 Like

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