I'm having trouble with a POST webhook that keeps failing with the error: "The webhook payload failed validation. This may happen if ChatGPT did not extract certain fields."
My Setup:
- Step 1: Webhook trigger receives data
- Step 2: ChatGPT extracts metadata from document text
- Step 3: JavaScript code processes and normalizes the data
- Step 4: POST webhook sends data to my API endpoint
The Problem: Step 4's data field contains malformed JSON that creates invalid payload structure:
{{{_GEN_1759900537463__payload_json}}}
"filingId": {{325615454__filingId}},
"metadata": {
"Title": "{{325648144__output_json__Title}}",
"UtilityCompany": "{{325648144__output_json__UtilityCompany}}",
...
}
}This creates invalid JSON like: json {"filingId":123,"metadata":{...existing object...}} "filingId": 123, "metadata": { "Title": "...", ...duplicate structure... } }
What I Expected: Step 3 already generates a complete, properly formatted payload_json that should be sent directly.
Question: Should Step 4's data field simply be {{step3__payload_json}} instead of manually reconstructing the JSON? The current setup appears to be duplicating the JSON structure and creating malformed payload.
Any help would be appreciated!
