How to see body parameters sent on execution error

Hi,
I’m sending an http post request, and am receiving the message "ERROR: The data in “Body Parameters” is no valid JSON. Is there a way to see the full JSON that was sent in the instance? I can only see the first few characters in the body parameters field when opening the failed execution.

json used to send the data:

{
"nome":"{{$json["body"]["nome"]}} {{$json["body"]["sobrenome"]}}",
"email":"{{$json["body"]["email"]}}",
"origem":"{{$json["body"]["origem"]}}",
"idimobiliaria":"3",
"telefone":"{{$json["body"]["telefone"]}}",
"permitir_alteracao":"true",
"idsituacao":"20",
"campos_adicionais": {
"cf_cpf": "{{$json["body"]["cpf"]}}",
"cf_dependentes":"{{$json["body"]["dependentes"]}}",
"cf_em_qual_cidade_voce_quer_o_seu_ape":"{{$json["body"]["regiaodeinteresse"]}}",
"cf_empreendimento_interesse":"{{$json["body"]["empreendimento"]}}",
"cf_maior_desafio":"{{$json["body"]["maiordesafio"]}}",
"cf_voce_mora_de_aluguel":"{{$json["body"]["moradealuguel"]}}",
"cf_conta_cef":"{{$json["body"]["possuicontanacef"]}}",
"cf_quando_pretende_comprar":"{{$json["body"]["quandopretendecomprar"]}}",
"cf_renda_familiar":"{{$json["body"]["rendafamiliar"]}}",
"cf_tempo_fgts":"{{$json["body"]["tempofgts"]}}",
"cf_motivo_do_contato":"{{$json["body"]["motivocontato"]}}"
},
"interacoes":
{"0":
{
"tipo" : "L",
"descricao" : "Lead em recuperação - remarketing"
}
}
}

Thanks!
Christophe

Is the “Body Parameters” field set to expression?

Hi Jan,

here’s the node I’m talking about:

{
  "nodes": [
    {
      "parameters": {
        "authentication": "headerAuth",
        "requestMethod": "POST",
        "url": "https://7lm.construtordevendas.com.br/api/cvio/lead",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "={\n \"nome\":\"{{$json[\"body\"][\"nome\"]}} {{$json[\"body\"][\"sobrenome\"]}}\",\n \"email\":\"{{$json[\"body\"][\"email\"]}}\",\n\"origem\":\"{{$json[\"body\"][\"origem\"]}}\",\n\"idimobiliaria\":\"3\",\n\"telefone\":\"{{$json[\"body\"][\"telefone\"]}}\",\n\"permitir_alteracao\":\"true\",\n\"idsituacao\":\"20\",\n\"campos_adicionais\": {\n\t\"cf_cpf\": \"{{$json[\"body\"][\"cpf\"]}}\",\n\t\"cf_dependentes\":\"{{$json[\"body\"][\"dependentes\"]}}\",\n\t\"cf_em_qual_cidade_voce_quer_o_seu_ape\":\"{{$json[\"body\"][\"regiaodeinteresse\"]}}\",\n\t\"cf_empreendimento_interesse\":\"{{$json[\"body\"][\"empreendimento\"]}}\",\n\t\"cf_maior_desafio\":\"{{$json[\"body\"][\"maiordesafio\"]}}\",\n\t\"cf_voce_mora_de_aluguel\":\"{{$json[\"body\"][\"moradealuguel\"]}}\",\n\t\"cf_conta_cef\":\"{{$json[\"body\"][\"possuicontanacef\"]}}\",\n\t\"cf_quando_pretende_comprar\":\"{{$json[\"body\"][\"quandopretendecomprar\"]}}\",\n\t\"cf_renda_familiar\":\"{{$json[\"body\"][\"rendafamiliar\"]}}\",\n\t\"cf_tempo_fgts\":\"{{$json[\"body\"][\"tempofgts\"]}}\",\n\"cf_motivo_do_contato\":\"{{$json[\"body\"][\"motivocontato\"]}}\"\n\t},\n\"interacoes\":\n{\"0\": \n    { \n    \"tipo\" : \"L\",\n    \"descricao\" : \"Lead em recuperação - remarketing\"\n    }\n}\n}"
      },
      "name": "CV - AGL Aguardando SDR1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1250,
        190
      ],
      "credentials": {
        "httpHeaderAuth": "CV token"
      }
    }
  ],
  "connections": {}
}

Hey @cdesseaux

I don’t think there is a way to see what exactly was sent from inside n8n but I can recommend you to use an external tool: https://webhook.site/

Once you open this URL it will create a unique address for you that accepts all type of request.

You can then change the URL in the HTTP Node on your workflow and see what was actually delivered to the receiving side.

I created a small sample that you can test using the following workflow:

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://webhook.site/0094d1f9-5776-4247-9dd1-f3bfae4a4e15",
        "options": {},
        "bodyParametersUi": {
          "parameter": [
            {
              "name": "nome",
              "value": "={{$json[\"nome\"]}} {{$json[\"sobrenome\"]}}"
            }
          ]
        },
        "headerParametersUi": {
          "parameter": []
        }
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "nome",
              "value": "Omar"
            },
            {
              "name": "sobrenome",
              "value": "Ajoue"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

To see what was received head to Webhook.site - Test, process and transform emails and HTTP requests

Thanks krynble, that makes sense, but since n8n doesn’t accept the json that I’m sending, it doesn’t even initiate sending it, so nothing arrives. I don’t understand why postman accepts it without problem and everything arrives at the destination application without a hitch, but in n8n it doesn’t work. And it’s not because of parameters, the part that causes the problem is this one:
“interacoes”:
{“0”:
{
“tipo” : “L”,
“descricao” : “Lead em recuperação - remarketing”
}
}

Any help would be greatly appreciated!

Regards,
Christophe

Hum I copied and pasted the JSON you provided into https://jsonlint.com/

It’s telling that the double quotes used are invalid. The JSON you added contains “ and ” quotes that are different than " quotes.

Can this be the case? I am not sure if it’s a copy paste problem but it’s something I noticed.