Skip to content
Trouble with JSON d...
 
Notifications
Clear all

Trouble with JSON data

9 Posts
2 Users
0 Reactions
6 Views
MrQuarps
(@mrquarps)
Posts: 6
Active Member
Topic starter
 

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.

 
Posted : 10/05/2025 12:20 pm
MrQuarps
(@mrquarps)
Posts: 6
Active Member
Topic starter
 

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”
}

 
Posted : 10/05/2025 12:30 pm
MrQuarps
(@mrquarps)
Posts: 6
Active Member
King_Samuel_David
(@king_samuel_david)
Posts: 55
Trusted Member
 

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

 
Posted : 10/05/2025 1:50 pm
MrQuarps
(@mrquarps)
Posts: 6
Active Member
Topic starter
 

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.

:slight_smile:

 
Posted : 10/05/2025 1:56 pm
MrQuarps
(@mrquarps)
Posts: 6
Active Member
Topic starter
 

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.

 
Posted : 10/05/2025 1:57 pm
King_Samuel_David
(@king_samuel_david)
Posts: 55
Trusted Member
 

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.

 
Posted : 10/05/2025 2:20 pm
MrQuarps
(@mrquarps)
Posts: 6
Active Member
Topic starter
 

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. ^^

 
Posted : 10/05/2025 3:46 pm
King_Samuel_David
(@king_samuel_david)
Posts: 55
Trusted Member
 

replied on discord

:slight_smile:

Please provide the rewritten markdown content *it should be in the markdown format.

 
Posted : 10/05/2025 3:59 pm
Share: