JSON parameter needs to be valid JSON - Dust.TT

Describe the problem/error/question

I have a workflow that sends a HTTP post to dust.tt. It was working on August 8 - with the exact same json post - and then on following days it’s not working. Everything looks correct and equal to when it was working. It’s only erroring when I drag information from a previous node. So all other aspects of the Json is ok.

What is the error message (if any)?

JSON parameter needs to be valid JSON
Error details

Other info

Item Index

0

Node type

n8n-nodes-base.httpRequest

Node version

4.2 (Latest)

n8n version

1.91.2 (Cloud)

Time

13.8.2025, 09.17.18

Stack trace

NodeOperationError: JSON parameter needs to be valid JSON at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:266:23) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:687:50) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:921:62 at processTicksAndRejections (node:internal/process/task_queues:95:5) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1257:20

POST to @Hubspot-insightsHubspot-insightsHubspot-insightsHubspot-insights

Parameters

Settings

Docs

Method

URL

Authentication

Send Query Parameters

Send Headers

Specify Headers

Header Parameters

Name

Value

Name

Value

Send Body

Body Content Type

Specify Body

JSON

{

“message”: {

“content”: “Find contacts who run or heavily influence creative-content production (Creative Ops, Studio Ops, Digital Ops, etc.) at company: {{ $json[‘Company name + ID’] }} \n\n**What to Look For**\n- Titles: VP/Director/Head of **Creative Ops, Studio Ops, Content Production, Digital Ops, Creative Services** (and close variants).\n- Minimum seniority: manager-level or higher.\n- Must have email **and** at least one recent engagement (open, call, meeting) in the last 12 months.\n\n**How to Pull Them**\n\n1. **Query CRM:** Search contact titles (fuzzy match on keywords above).\n2. **Deal Check:** Keep only those linked to an active pipeline deal **Query Chorus Transcripts:** Look for leading voices in deal conversations **or** whose company revenue ≥ $50 M.\n3. **Score Fast:**\n - +20 pts if tied to an open deal ≥ $50 K.\n - +10 pts for exact-match title keywords.\n - +5 pts for engagement in last 90 days.\n - −10 pts if no activity for 18 months.\n4. **Rank & Trim:** Return top 3-5 scored contacts.\n\n**Output Needed**\n\nName | Title | Company Name | Deal Stage (if any) | Last Engagement | Score | HubSpot Contact ID | Why include for each\n”,

{ “message”: { “content”: “Find contacts who run or heavily influence creative-content production (Creative Ops, Studio Ops, Digital Ops, etc.) at company: Fashion Nova 4823821898 \n\n**What to Look For**\n- Titles: VP/Director/Head of **Creative Ops, Studio Ops, Content Production, Digital Ops, Creative Services** (and close variants).\n- Minimum seniority: manager-level or higher.\n- Must have email **and** at least one recent engagement (open, call, meeting) in the last 12 months.\n\n**How to Pull Them**\n\n1. **Query CRM:** Search contact titles (fuzzy match on keywords above).\n2. **Deal Check:** Keep only those linked to an active pipeline deal **Query Chorus Transcripts:** Look for leading voices in deal conversations **or** whose company revenue ≥ $50 M.\n3. **Score Fast:**\n - +20 pts if tied to an open deal ≥ $50 K.\n - +10 pts for exact-match title keywords.\n - +5 pts for engagement in last 90 days.\n - −10 pts if no activity for 18 months.\n4. **Rank & Trim:** Return top 3-5 scored contacts.\n\n**Output Needed**\n\nName | Title | Company Name | Deal Stage (if any) | Last Engagement | Score | HubSpot Contact ID | Why include for each\n”, “context”: { “username”: “meet-copilot”, “timezone”: “UTC” }, “mentions”: [ { “configurationId”: “” } ] }, “blocking”: true }

Options

No properties

You can view the raw requests this node makes in your browser’s developer console

I wish this node would…

Problem in node ‘POST to @Hubspot-insights**‘**

JSON parameter needs to be valid JSON

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.)

{
  "name": "[Summit] Find key contacts",
  "nodes": [
    {
      "parameters": {
        "url": "=https://dust.tt/api/v1/w/CwtDr6OsD6/assistant/conversations/{{ $json.conversation.sId }}/?limit=1&order=desc ",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "authorization",
              "value": " Bearer sk-46a62c23f0367c8d29331ecdafaf55ef"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        540,
        -260
      ],
      "id": "171e01da-bf6e-4734-9748-aae60ac4c0e2",
      "name": "GET from Dust"
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        280,
        -260
      ],
      "id": "95ef1fbc-4a29-4a55-a3b3-bbe2bbccff07",
      "name": "Wait2",
      "webhookId": "81267fa7-3b6a-4b52-a792-60f572470697"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://dust.tt/api/v1/w/CwtDr6OsD6/assistant/conversations",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "authorization",
              "value": "Bearer sk-de96c4b12a06827985a2035b058f1dce"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"message\": {\n    \"content\": \"Find contacts who run or heavily influence creative-content production (Creative Ops, Studio Ops, Digital Ops, etc.) at company: {{ $json['Company name + ID'] }} \\n\\n**What to Look For**\\n- Titles: VP/Director/Head of **Creative Ops, Studio Ops, Content Production, Digital Ops, Creative Services** (and close variants).\\n- Minimum seniority: manager-level or higher.\\n- Must have email **and** at least one recent engagement (open, call, meeting) in the last 12 months.\\n\\n**How to Pull Them**\\n\\n1. **Query CRM:** Search contact titles (fuzzy match on keywords above).\\n2. **Deal Check:** Keep only those linked to an active pipeline deal **Query Chorus Transcripts:** Look for leading voices in deal conversations **or** whose company revenue ≥ $50 M.\\n3. **Score Fast:**\\n    - +20 pts if tied to an open deal ≥ $50 K.\\n    - +10 pts for exact-match title keywords.\\n    - +5 pts for engagement in last 90 days.\\n    - −10 pts if no activity for 18 months.\\n4. **Rank & Trim:** Return top 3-5 scored contacts.\\n\\n**Output Needed**\\n\\nName | Title | Company Name | Deal Stage (if any) | Last Engagement | Score | HubSpot Contact ID | Why include for each\\n\",\n    \"context\": {\n      \"username\": \"meet-copilot\",\n      \"timezone\": \"UTC\"\n    },\n    \"mentions\": [\n      {\n        \"configurationId\": \"YCWkSYwrEJ\"\n      }\n    ]\n  },\n  \"blocking\": true\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        -260
      ],
      "id": "d9970f8c-bcc3-4266-badf-3a85bfe9281a",
      "name": "POST to @Hubspot-insights"
    },
    {
      "parameters": {
        "text": "={{ $json.latestContent }}",
        "schemaType": "fromJson",
        "jsonSchemaExample": "{\n  \"company\": {\n    \"name\": \"Walmart\",\n    \"id\": \"29201885827\"\n  },\n  \"contacts\": [\n    {\n      \"company_name\": \"Walmart\",\n      \"name\": \"Sarah Maloney\",\n      \"title\": \"Operations & Resourcing Walmart Creative Studios Senior Manager, Production\",\n      \"deal_stage\": \"S3 - Solution Mapping ($300K)\",\n      \"last_engagement\": \"Aug 6, 2025\",\n      \"score\": 45,\n      \"hubspot_contact_id\": \"13296092\",\n      \"why_include\": \"Owns day-to-day production resourcing and signs off on tooling budgets.\"\n    },\n    {\n      \"company_name\": \"Walmart\",\n      \"name\": \"…\",\n      \"title\": \"…\",\n      \"deal_stage\": \"…\",\n      \"last_engagement\": \"…\",\n      \"score\": 40,\n      \"hubspot_contact_id\": \"…\",\n      \"why_include\": \"…\"\n    },\n    {\n      \"company_name\": \"Walmart\",\n      \"name\": \"…\",\n      \"title\": \"…\",\n      \"deal_stage\": \"…\",\n      \"last_engagement\": \"…\",\n      \"score\": 38,\n      \"hubspot_contact_id\": \"…\",\n      \"why_include\": \"…\"\n    }\n  ]\n}\n",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [
        1020,
        -260
      ],
      "id": "d28e9255-8328-4747-9d54-5e2e6f08f8ca",
      "name": "Information Extractor"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1020,
        -80
      ],
      "id": "ee0be531-0ee8-47c5-a290-6f4c7ce98770",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "lqRnfh7AL1IejLjv",
          "name": "OpenAi account w money"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "output.contacts",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1400,
        -260
      ],
      "id": "c0483f7d-73ba-4782-92d4-5e9239d1f6bd",
      "name": "Split Out"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1ZgnMxcaabwvkgxQ3qVUcSF7ZY0kmxmQUEZgkaUVkOpo",
          "mode": "list",
          "cachedResultName": "[AI Summit 2025] Tier 1 Contacts",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZgnMxcaabwvkgxQ3qVUcSF7ZY0kmxmQUEZgkaUVkOpo/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Tier 1 Contacts",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZgnMxcaabwvkgxQ3qVUcSF7ZY0kmxmQUEZgkaUVkOpo/edit#gid=0"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": [
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "deal_stage",
              "displayName": "deal_stage",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "last_engagement",
              "displayName": "last_engagement",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "hubspot_contact_id",
              "displayName": "hubspot_contact_id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "why_include",
              "displayName": "why_include",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "score",
              "displayName": "score",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1640,
        -260
      ],
      "id": "17e20892-0228-4a8d-b1ba-da7120b0c2c3",
      "name": "Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "wanUJrzOo3kCdrDe",
          "name": "Google Sheets / Kasper"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://dust.tt/api/v1/w/CwtDr6OsD6/assistant/conversations",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "authorization",
              "value": " Bearer sk-46a62c23f0367c8d29331ecdafaf55ef"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"message\": {\n    \"content\": \"Analyse this contact {{ $json.name }} {{ $json.title }}{{ $json.hubspot_contact_id }} and write an email pitch for why they should attend our AI Summit, a limited meet for top enterprise creative ops leaders working in retail. Analyse past conversations from chorus transcripts and map their specific mentioned pain points and tie the email to that. \",\n    \"context\": {\n      \"username\": \"meet-copilot\",\n      \"timezone\": \"UTC\"\n    },\n    \"mentions\": [\n      {\n        \"configurationId\": \"YCWkSYwrEJ\"\n      }\n    ]\n  },\n  \"blocking\": true\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2000,
        -260
      ],
      "id": "50618ce8-38c0-4403-90d6-54bb63cd3f7f",
      "name": "POST to @Hubspot-insights1",
      "disabled": true
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        2680,
        -260
      ],
      "id": "9d9e118a-5d6a-4546-ae5f-f3aa692b3bac",
      "name": "Split Out1",
      "disabled": true
    },
    {
      "parameters": {
        "text": "={{ $json.conversation }}",
        "schemaType": "fromJson",
        "jsonSchemaExample": "{\n  \"email_pitches\": [\n    {\n      \"subject\": \"Exclusive AI Summit Invitation – Transform Creative Studio Operations at Scale\",\n      \"recipient_name\": \"Brittany Kanakis\",\n      \"recipient_company\": \"Walmart\",\n      \"body_markdown\": \"Hi Brittany,\\n\\nI hope this email finds you well. I'm reaching out because…\"\n    },\n    {\n      \"subject\": \"Invitation: Retail AI Roundtable for Creative Ops Leaders\",\n      \"recipient_name\": \"Benjamin Peterson\",\n      \"recipient_company\": \"Walmart\",\n      \"body_markdown\": \"Hi Benjamin,\\n\\nFollowing our recent conversation about accelerating studio workflows…\"\n    }\n  ]\n}\n",
        "options": {
          "systemPromptTemplate": "Find every block that is an outbound-sales email pitch.\nA block is a pitch when it either\n  • starts with “## Email Pitch”   --OR--\n  • contains a line that begins “Subject:”.\nFor each pitch, return the fields required by the JSON schema below.\nOutput exactly one JSON object that validates against the schema.\nDo not include any other text.\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [
        2300,
        -260
      ],
      "id": "89f888f4-e30d-4793-857f-8d67d2fcf1b1",
      "name": "Information Extractor1",
      "disabled": true
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "chatgpt-4o-latest",
          "mode": "list",
          "cachedResultName": "chatgpt-4o-latest"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        2300,
        -100
      ],
      "id": "0c7b9d98-384c-45b8-aed8-42d835bdb5fc",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "id": "lqRnfh7AL1IejLjv",
          "name": "OpenAi account w money"
        }
      },
      "disabled": true
    },
    {
      "parameters": {
        "content": "Generate Email pitch",
        "height": 1000,
        "width": 1260
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1860,
        -520
      ],
      "id": "dd41defc-5ffc-44ce-ba4d-b2dfe852e3d5",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "formTitle": "Find contacts",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Company name + ID",
              "placeholder": "Company name + ID",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        -640,
        -260
      ],
      "id": "7a4877d0-a567-4ea8-892d-e99bf866fd94",
      "name": "On form submission",
      "webhookId": "cd419e5d-dbac-4869-9114-4f17995f3984"
    },
    {
      "parameters": {
        "jsCode": "const input = $input.all()[0].json;\n\n// Flatten content array and extract inner objects\nconst contentArray = input.conversation?.content?.map(obj => {\n  return Object.values(obj)[0]; // get the nested message object\n});\n\n// Get the last item from the flattened array\nconst latestMessage = contentArray?.[contentArray.length - 1];\n\n// Extract the \"content\" field\nconst latestContent = latestMessage?.content || null;\n\nreturn [{ json: { latestContent } }];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        780,
        -260
      ],
      "id": "ef6bfd4c-4e01-47ae-a8f3-1c61d29fdfdc",
      "name": "GET Response"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "d0ab52f1-1cbc-49c7-a2e1-79df213f1f14",
              "name": "Company name + ID",
              "value": "={{ $json['Company name + ID'] }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -320,
        -260
      ],
      "id": "62df061d-34c4-441c-9d9a-4c30b773510c",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "jsCode": "const company = $input.first().json[\"Company name + ID\"];\n\nconst content = `Find contacts who run or heavily influence creative-content production (Creative Ops, Studio Ops, Digital Ops, etc.) at company: ${company}\n\n**What to Look For**\n- Titles: VP/Director/Head of **Creative Ops, Studio`;\n\nreturn { content };\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -320,
        -60
      ],
      "id": "6449fc19-f1c0-4beb-bd78-f5a8ebdf943c",
      "name": "Code"
    }
  ],
  "pinData": {
    "On form submission": [
      {
        "json": {
          "Company name + ID": "Fashion Nova\t4823821898",
          "submittedAt": "2025-08-11T14:22:11.799+02:00",
          "formMode": "production"
        }
      }
    ]
  },
  "connections": {
    "Wait2": {
      "main": [
        [
          {
            "node": "GET from Dust",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "POST to @Hubspot-insights": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET from Dust": {
      "main": [
        [
          {
            "node": "GET Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "POST to @Hubspot-insights1": {
      "main": [
        [
          {
            "node": "Information Extractor1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor1": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET Response": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "POST to @Hubspot-insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "POST to @Hubspot-insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1aca005b-14f4-40c4-8d2b-3303d05803da",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "58e159715da38ba0f4953b50b91549e8c5eddea075b4e8ba5de30210edb2b2ac"
  },
  "id": "5cuypOHVnoxNJQJT",
  "tags": [
    {
      "createdAt": "2025-08-07T12:25:30.617Z",
      "updatedAt": "2025-08-07T12:25:30.617Z",
      "id": "eF4cAhEQxdx100ao",
      "name": "Dust.tt"
    },
    {
      "createdAt": "2025-08-07T12:25:34.303Z",
      "updatedAt": "2025-08-07T12:25:34.303Z",
      "id": "gycAbJ8bvbqzs1rm",
      "name": "Find contacts"
    }
  ]
}

Share the output returned by the last node

Information on your n8n setup

Environment

  • n8n version: 1.91.2 (Cloud)

  • Database (default: SQLite): n8n Cloud (managed; unknown)

  • n8n EXECUTIONS_PROCESS setting (default: own, main): n8n Cloud (managed; unknown)

  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n Cloud

  • Operating system: n/a (Cloud)

Node details

  • Node type: n8n-nodes-base.httpRequest

  • Node version shown in UI: 4.2 (Latest)

  • Stack trace references: HttpRequest/V3/HttpRequestV3.node.js
    (Possible version mismatch: UI shows 4.2 while stack mentions V3.)

Time of failure

  • **August 13, 2025, 08:10:46 CEST
    **
    Current JSON payload (failing)

    json
    

    CopyEdit

    { "message": { "content": {{ $json["Company name + ID"] }} "context": { "username": "meet-copilot", "timezone": "UTC" }, "mentions": [ { "configurationId": "YCWkSYwrEJ" } ] }, "blocking": true }

Hey @Kasper_Leth_Hounisen, sorry to hear about the flaky HTTP POST issue—sounds frustrating, especially since it was working fine just days ago. I’ve seen similar JSON validation errors in n8n workflows before, often tied to how expressions resolve in the body

From the error (“JSON parameter needs to be valid JSON”) and stack trace, it’s failing during body parsing in the HTTP Request node.It works with hardcoded JSON but bombs when pulling {{ $json["Company name + ID"] }} from the previous node (Edit Fields).

Hello! I have been getting the same issue recently as well.

I run my HTTPS with a JSON body pulled from previous nodes and I will get the JSON format error. Works fine with manually entered JSON though.

After some digging and troubleshooting, I believe it is due to how n8n’s objects are formed and presented. My work around was manually transform my data into an encapsuled JSON body and then use that for the HTTPS node.

Cheers!

Hi @Kasper_Leth_Hounisen

Drilling in to your workflow, the value getted from ‘Company name + ID’ has a raw tab, which is not allowed in json. Your have to transform it to json string, you can use it in json by code: {{ $json[‘Company name + ID’].toJsonString().slice(1,-1) }}.

For security please remove the api authorization on the http post node.

@Lily_wu thank you for your reply, tried updating the json - still has json error:

Hi @Kasper_Leth_Hounisen

The param need to be {{ $(‘Edit Fields’).item.json[‘Company name + ID’].toJsonString().slice(1,-1)}}, please note that two functions invoked after param get. And then the raw tab will transform to \t:

Still get the json error, seems like an error in n8n?

Full json

{
“message”: {
“content”: "{{ $node[“Edit Fields”].json[“Company name + ID”].toJsonString() }}
",
“context”:
“username”: “meet-copilot”,
“timezone”: “UTC”
},
“mentions”: [
{
“configurationId”: “hidden”
}
]
},
“blocking”: true
}

The previous node is:
{{ $json[‘Company name + ID’] }}

Hi @Kasper_Leth_Hounisen

You missed the function of slice.

Please take a look the workflow I’ve changed.

The issue comes from having a tab character in the Company Name + ID

if you can remove originally in the form - that will fix the problem, if you can’t then you will need to replace it further down the workflow in the Edit Fields or HTTP Request node with something like:

  • {{ $json['Company name + ID'].replace(/\t/g, '\\t') }}
  • {{ $json['Company name + ID'].replace(/\t/g, ' ') }}

first will replace the tab with its escaped equivalent, while the second one will replace it with a space.