JSON parameter need to be a valid JSON
Guys, I hope you find it well.
I’m making a request on n8n and for some reason it’s not accepting my variables and it gives an error in the JSON.
First I was pulling them from an Excel, then now I created a SET node to try and see if it worked, but it doesn’t work.
I did a test in another workflow with the same request but without the variables (expressions) and it works.
Does anybody know how to solve this?
[https://aawz.app.n8n.cloud/workflow/PiOqX1TwqMZuibMc/executions/57]
{
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “8f15dc730c58cd2eb5917ce235e3dee955c5e1e6d48924c721d3be25bba46505”
},
“nodes”: [
{
“parameters”: {
“method”: “POST”,
“url”: “https://crm.rdstation.com/api/v1/tasks?token=66534df919eb1d0012fec498”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “accept”,
“value”: “application/json”
},
{
“name”: “content-type”,
“value”: “application/json”
}
]
},
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “={\n "task": {\n "date": "{{ $(‘Edit Fields’).item.json[‘Due Date’] }}",\n "deal_id": "{{ $(‘Edit Fields’).item.json.ID }}",\n "done": true,\n "hour": "{{ $(‘Edit Fields’).item.json.Hora }}",\n "notes": "{{ $(‘Edit Fields’).item.json.Notas }}",\n "subject": "{{ $json.Tipo }}",\n "type": "task"\n }\n}\n”,
“options”: {}
},
“id”: “aa6d7b0f-9bde-4b9c-a175-8de824b192d1”,
“name”: “Criando tarefa como concluida1”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.1,
“position”: [
2040,
240
]
}
],
“connections”: {},
“pinData”: {}
}