Need Help, i am stuck at https

hey i am working on template in which i got stuck in https node where i couldng process it and move further i tried chatgpt and all other ai stuff and iam a very beginner to this and couldnt able to resolve the issue. can someone please help me out to achieve this please.


this is the workflow where as u can see the error at vertex ai-veo which is
this is what i am suffereing from. where {
“endpoint”: “projects/***********************************/veo-3.0-generate-preview”,
“instances”: [
{
“prompt”: $json.TEXT_PROMPT
}
],
“parameters”: {
“aspectRatio”: “9:16”,
“sampleCount”: 1,
“durationSeconds”: “8”,
“personGeneration”: “allow_all”,
“addWatermark”: true,
“includeRaiReason”: true,
“generateAudio”: true
}
} this is the body used as shown in above and the error is pasted here below{
“errorMessage”: “JSON parameter needs to be valid JSON”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “Vertex AI-VEO”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “29/7/2025, 9:32:35 am”,
“n8nVersion”: “1.103.2 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeOperationError: JSON parameter needs to be valid JSON”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:366:15)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1211:32)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1581:38",
" at processTicksAndRejections (node:internal/process/task_queues:105:5)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2157:11”
]
}
} this is the error. can someone help me out please

Hey @VAMSI_NAIK_Banothu hope all is good. Welcome.

The issue is not with URL but with the body. Could you share how the JSON is rendered for the HTTP Request body?


and this is the body
{
“endpoint”: “projects/n8n-project-440404/locations/us-central1/publishers/google/models/veo-3.0-generate-preview”,
“instances”: [
{
“prompt”: $json.TEXT_PROMPT
}
],
“parameters”: {
“aspectRatio”: “9:16”,
“sampleCount”: 1,
“durationSeconds”: “8”,
“personGeneration”: “allow_all”,
“addWatermark”: true,
“includeRaiReason”: true,
“generateAudio”: true
}
}

Probably some part of json in the body of the request is not formatted correctly or missing. You can use {{ JSON.stringify ($json.output) }} this escape or force the correct format for json

If you paste it here the body json you use it we can help you better

Try to use $json.TEXT_PROMPT.toJsonString() instead.

{
“endpoint”: “projects/n8n-project-440404/locations/us-central1/publishers/google/models/veo-3.0-generate-preview”,
“instances”: [
{
“prompt”: $json.TEXT_PROMPT.toJsonString()
}
],
“parameters”: {
“aspectRatio”: “9:16”,
“sampleCount”: 1,
“durationSeconds”: “8”,
“personGeneration”: “allow_all”,
“addWatermark”: true,
“includeRaiReason”: true,
“generateAudio”: true
}
}
and error JSON parameter needs to be valid JSON again {
“errorMessage”: “JSON parameter needs to be valid JSON”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “Vertex AI-VEO”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “29/7/2025, 10:34:08 am”,
“n8nVersion”: “1.103.2 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeOperationError: JSON parameter needs to be valid JSON”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:366:15)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1211:32)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1581:38",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2157:11"
]
}
}

tried but error again

Can you please click on this and show us the full rendered json?

this needs to be surrounded by {{ and }}, and make sure the field is an expression.

{{ $json.TEXT_PROMPT.toJsonString() }}
1 Like

i guess its working will pin if i stuck again thanks so much and take my love

1 Like

i am facing new issue in fetching, i am trying for 9:16 potrait but geeting an error like
[
{
“name”:
“projects/n8n-connection-467209/locations/us-central1/publishers/google/models/veo-3.0-generate-preview/operations/b2a2681f-cd5f-4f40-ab0e-896cd06481c3”,
“done”:
true,
“error”:
{
“code”:
3,
“message”:
“Unsupported output video aspect ratio ASPECT_RATIO_9_16”
}
}
]

1 Like

opps sorry for asking such silly stuff. and thanks for ur corporation

1 Like

i got stuck again with new issue


and

Hey can u check the new issue and help to build the workflow please

how to change the aspect ratio in n8n , i am unable to figure out please help

Hey how did you solve this, I am stuck with the same issue, could you paste the code here, I am working on the same template, thanks bud!