Parse and score the Judge's output
The Judge outputs JSON with scores for 5 criteria (Clarity, Feasibility, Impact, Innovation, Adherence), but it's still a raw string. You need to:
- Parse the JSON — Convert the string into a usable object
- Clean up formatting — Remove any markdown code blocks the AI might have added
- Calculate the average score — Determine overall quality
- Add
final_score— This is what the IF node will check
This Code node is the bridge between the Judge's output and the decision logic.
Deze oefening maakt deel uit van de cursus
Building Marketing Workflows with n8n
Praktische interactieve oefening
Zet theorie om in actie met een van onze interactieve oefeningen.
Begin met trainen