I’m a newbie to n8n and was trying to connect an HTTP Request Node with Tavily API and with right token, but on executing the step, I’m getting the following error.
Here’s the JSON for the node as well. The HTTP Form Requests gives the error code 422, which suggests there might be some semantic issue. So I tried validating the JSON with a parser, but the issue persists!
I’m planning to use data from a Google sheet to be sent as the parameter, but the node fails on the simple request itself.
{
“nodes”: [
{
“parameters”: {
“method”: “POST”,
“url”: “https://api.tavily.com/search”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “Authorization”,
“value”: “Bearer ”
}
]
},
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “={\n "query": "who is Leo Messi?",\n "topic": "general",\n "search_depth": "basic",\n "chunks_per_source": 3,\n "max_results": 1,\n "time_range": null,\n "days": 7,\n "include_answer": true,\n "include_raw_content": true,\n "include_images": false,\n "include_image_descriptions": false,\n "include_domains": ,\n "exclude_domains": ,\n "country": null\n}”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
440,
240
],
“id”: “206438d0-e5a4-40dc-a9b5-8dd148134028”,
“name”: “HTTP Request”
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “69d9903ab2c9d8e704c210d72b2ee42032417b8d35f25afe2662e04b120767f5”
}
}