I copied and pasted a workflow and was surprised when I encountered the error: "ERROR: JSON parameter needs to be a valid JSON."
Since the only change I need to make is adding the API, I'm really wondering what could be going wrong.
This is the video: https://www.youtube.com/watch?v=8sPYxqU1SoQ
This is the workflow that can be downloaded and implemented: https://drive.google.com/file/d/1-uKPgRFyNVTsZ7NkpF-Gm6gaijvBPbXJ/view
I'm stuck at the HeyGen part around 07:56.
json
{
“video_inputs”: [
{
“character”: {
“type”: “avatar”,
“avatar_id”: “{{ $json_avatar_id }}”,
“avatar_style”: “normal”,
“scale”: 1.0,
“offset”: {
“x”: 0.0,
“y”: 0.0
},
“matting”: false
},
“voice”: {
“type”: “text”,
“input_text”: “{{ $(‘AI Agent’).item.json.output }}”,
“voice_id”: “{{ $json_voice_id }}”,
“speed”: 1.1,
“pitch”: 50,
“emotion”: “Excited”
},
“background”: {
“type”: “video”,
“url”: “{{ $json_background_video_url }}”,
“play_style”: “loop”,
“fit”: “cover”
}
}
],
“dimension”: {
“width”: 720,
“height”: 1280
},
“aspect_ratio”: “9:16”,
“caption”: false,
“title”: “callin.io TEST AVATAR”
}
Hi, which parts have you edited so far? You would need to edit just the ‘Setup Heygen’ node and provide your API, which seems you have, as well as an avatar ID and voice ID. If nothing else is changed, it should work perfectly fine. Let me know, as it is working all okay on my side. Can you show the edit fields node called ‘Setup HeyGen’, please remember to remove any sensitive data.
Best regards,
Samuel
Yeah, that’s actually the amusing part. I feel like that this is precisely what I did. However, I had a different workflow previously, and even then, I encountered similar issues with JSON, but via an HTTP request and not within the current node.
Anyway, I am providing you the Edit Fields.
Copied Error Details in the Create Avatar Node:
json
{
“errorMessage”: “JSON parameter needs to be valid JSON”,
“errorDetails”: {},
“callin.ioDetails”: {
“nodeName”: “Create Avatar Video”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “10.5.2025, 21:57:03”,
“callin.ioVersion”: “1.91.2 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeOperationError: JSON parameter needs to be valid JSON”,
“ at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:266:23)”,
“ at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:687:50)”,
“ at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:921:62”,
“ at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1257:20”
]
}
}
Please provide the rewritten markdown content *it should be in the markdown format.
I noticed the avatar_id
– perhaps try using “Carolineexpressivepublic”. It seems you might be using an avatar group ID, which could be the source of the problem.
However, this doesn't fully account for why other requests are also failing. Are any requests succeeding, or is this error occurring consistently?
The JSON structure appears to be correct, so the issue might be related to the runtime environment. You could consider upgrading your callin.io cloud instance to the latest version, or simply restarting it. I tested this on version 1.89.2, but I've observed that several related bugs have been fixed in more recent versions.
You can follow this guide to update your callin.io Cloud instance:
This might be the most straightforward way to resolve the issue.
Thank you for your assistance. Your feedback was helpful, and some members on the Discord server collaborated with me on a workaround and helped with troubleshooting. We managed to resolve it and even corrected the other workflow.
However, a new issue has arisen. I'm sending data from callin.io to the HeyGen API, but the videos are not being crafted. The outcome is disappointing. ^^
replied on discord
Please provide the rewritten markdown content *it should be in the markdown format.