HTTP Request GET Node - Invalid JSON error

Describe the problem/error/question

I am getting this error on GET HTTP Request
Although Same URL and parameters works fine on Post man

http://tinyurl.com/22m3vy4h

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

{
“name”: “Priya 2024 BE Group test”,
“nodes”: [
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “a81da95a-b483-44f1-997e-0011478fc9b9”,
“options”: {}
},
“id”: “17e96cce-3ca3-4c7b-89dd-ae72f1158336”,
“name”: “Webhook”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 1,
“position”: [
200,
20
],
“webhookId”: “a81da95a-b483-44f1-997e-0011478fc9b9”
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://api.smart.byggfakta.se/v1/auth”,
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “{\n "client_id": "test123",\n "client_secret": "test"\n}”,
“options”: {}
},
“id”: “6258033d-0bcf-4c82-b1b0-d784a932e3e7”,
“name”: “Auth”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4,
“position”: [
300,
240
]
},
{
“parameters”: {
“url”: “https://api.smart.byggfakta.se/v1/client/projects”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “offset”,
“value”: “0”
},
{
“name”: “limit”,
“value”: “1”
},
{
“name”: “filter”,
“value”: “=id:in:{{ $json["projectId"] }}”
},
{
“name”: “cards”,
“value”: “1”
}
]
},
“sendHeaders”: true,
“specifyHeaders”: “json”,
“jsonHeaders”: “=Authorization:Bearer {{ $node["Set"].json["bearer"] }}”,
“options”: {}
},
“id”: “c0e13ad6-1521-455b-a6a3-933c9c1e64c7”,
“name”: “Project details”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4,
“position”: [
700,
20
]
},
{
“parameters”: {
“keepOnlySet”: true,
“values”: {
“number”: [
{
“name”: “projectId”,
“value”: “={{ $json["body"]["data"]["project_id"] }}”
},
{
“name”: “bearer”,
“value”: “={{$node["Auth"].json["result"]["opid"] }}”
}
]
},
“options”: {
“dotNotation”: true
}
},
“id”: “90bab4bd-ff60-44ff-a200-7efcc4bbce37”,
“name”: “Set”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 2,
“position”: [
500,
20
]
}
],
“pinData”: {
“Webhook”: [
{
“json”: {
“headers”: {
“host”: “workflow-test.cloud.funnelbud.com”,
“x-forwarded-scheme”: “https”,
“x-forwarded-proto”: “https”,
“x-forwarded-for”: “51.137.28.69”,
“x-real-ip”: “51.137.28.69”,
“connection”: “close”,
“content-length”: “207”,
“x-smart-signature”: “6REU19sRtrHmNKAcYDRWR6S1oD6i+WQ6c2pM1K9osDE=”,
“content-type”: “application/json; charset=utf-8”
},
“params”: {},
“query”: {},
“body”: {
“event_type”: “USER_PROJECT_STATUS_CHANGED”,
“version”: “1”,
“message_id”: 421656,
“timestamp”: 1706611843,
“data”: {
“user_id”: 17930,
“project_id”: 1119111,
“user_project_status_id”: 3,
“datetime”: “2024-01-30 10:50:37”
}
}
}
}
]
},
“connections”: {
“Webhook”: {
“main”: [
[
{
“node”: “Auth”,
“type”: “main”,
“index”: 0
},
{
“node”: “Set”,
“type”: “main”,
“index”: 0
}
]
]
},
“Auth”: {
“main”: [
[
{
“node”: “Set”,
“type”: “main”,
“index”: 0
}
]
]
},
“Set”: {
“main”: [
[
{
“node”: “Project details”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: false,
“settings”: {},
“versionId”: “467d2256-ab5a-4e7c-af1d-3b553aaefc3c”,
“id”: “21”,
“meta”: {
“instanceId”: “ded196fee5d3a631c17ba9e3b87e163eade22858ecc78620232d6f5215d0a9e8”
},
“tags”:
}```

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:

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

{
“meta”: {
“instanceId”: “ded196fee5d3a631c17ba9e3b87e163eade22858ecc78620232d6f5215d0a9e8”
},
“nodes”: [
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “a81da95a-b483-44f1-997e-0011478fc9b9”,
“options”: {}
},
“id”: “17e96cce-3ca3-4c7b-89dd-ae72f1158336”,
“name”: “Webhook”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 1,
“position”: [
200,
20
],
“webhookId”: “a81da95a-b483-44f1-997e-0011478fc9b9”
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://api.smart.byggfakta.se/v1/auth”,
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “{\n "client_id": "d4913428-c44a-4ca6-ac9b-120e0e4c96ed",\n "client_secret": "7b1010eb-2824-4c3b-bb11-75a0e6e09246"\n}”,
“options”: {}
},
“id”: “6258033d-0bcf-4c82-b1b0-d784a932e3e7”,
“name”: “Auth”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4,
“position”: [
300,
240
]
},
{
“parameters”: {
“url”: “https://api.smart.byggfakta.se/v1/client/projects”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “offset”,
“value”: “0”
},
{
“name”: “limit”,
“value”: “1”
},
{
“name”: “filter”,
“value”: “=id:in:{{ $json["projectId"] }}”
},
{
“name”: “cards”,
“value”: “1”
}
]
},
“sendHeaders”: true,
“specifyHeaders”: “json”,
“jsonHeaders”: “=Authorization:Bearer {{ $node["Set"].json["bearer"] }}”,
“options”: {}
},
“id”: “c0e13ad6-1521-455b-a6a3-933c9c1e64c7”,
“name”: “Project details”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4,
“position”: [
700,
20
]
},
{
“parameters”: {
“keepOnlySet”: true,
“values”: {
“number”: [
{
“name”: “projectId”,
“value”: “={{ $json["body"]["data"]["project_id"] }}”
},
{
“name”: “bearer”,
“value”: “={{$node["Auth"].json["result"]["opid"] }}”
}
]
},
“options”: {
“dotNotation”: true
}
},
“id”: “90bab4bd-ff60-44ff-a200-7efcc4bbce37”,
“name”: “Set”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 2,
“position”: [
500,
20
]
}
],
“connections”: {
“Webhook”: {
“main”: [
[
{
“node”: “Auth”,
“type”: “main”,
“index”: 0
},
{
“node”: “Set”,
“type”: “main”,
“index”: 0
}
]
]
},
“Auth”: {
“main”: [
[
{
“node”: “Set”,
“type”: “main”,
“index”: 0
}
]
]
},
“Set”: {
“main”: [
[
{
“node”: “Project details”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

Version 0.224.4

@Jon any ideas?

Hay @Priya_Jain It is hard to see your workflow in this format. What you can do is copy your workflow and past here in a post between ``` your workflow here ```

Thanks @Ruslan_Yanyshyn . Enabling Follow redirects solved the issue.

2 Likes

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