I’m glad I’m not the only one stuck on this I’ve been trying to force OpenAI in Pipedream to return strict JSON too. I’ve managed a partial workaround by running the response through a Node.js step and cleaning it up with JSON.parse, but it still feels a bit fragile.
Has anyone here found a more reliable way — maybe using the OpenAI SDK’s response_format: { type: “json_schema” } option, or some hidden trick in the Chat step to guarantee valid JSON?
Would love to hear if someone has a clean solution for this.
Thanks so much for the tip about the response format I’ve now set the OpenAI step to return a JSON schema (ai_title, ai_description, ai_tags, ai_price). That part works, and I can see the structured response coming through in Pipedream.
The issue I’m still running into is getting that parsed AI output (especially ai_description) to reliably show up in Google Sheets via the add_single_row step. Sometimes it’s blank, even though I can see the description in the AI response.
Do you have any advice on the cleanest way to handle mapping / parsing between the ChatGPT response and the Google Sheets row?