← All questionsn8n: the OpenAI node gives me JSON back as one big string and the next node can't read it
About n8n, ChatGPT and Airtable
Asking it to sort inbound leads into three buckets and return {bucket, reason}. It does, but the Airtable node sees one field with the whole thing in it, curly braces and all.
Replies
Add a Code node between them with one line: return items.map(i => ({ json: JSON.parse(i.json.message.content) })). Or in newer n8n the OpenAI node has an 'Output content as JSON' toggle, flip that and skip the code node. I use the toggle.
Sep 9Nolan, Omar S. and Nate agree
I did the same in Make with a Parse JSON module. The bit that got me was the model sometimes wrapping the JSON in ```json fences so the parse fails one time in ten. Tell it 'no markdown, raw JSON only' in the system prompt.
Sep 10Nate and Priya N. agree
NNolan @nolanFormer property manager · uses Airtable and ChatGPT Zapier has Formatter → Utilities → Parse JSON for this if you ever go that way. Following anyway, curious whether the toggle is reliable.
Sep 10
Sign in to reply.
Replies sit in the order people agree with them; the ones the asker marks “helped” lead. Names, never a number.