How do I get Structured Data from OpenAI with n8n as with make.com?

Hi, everybody. I am currently using the response_format OpenAI published to get structured data from a long text. But the quality is significantly less than what I get if I use the structured data module make.com provides for OpenAI. How can this be? Are they using something else then me? Here’s a sample of my json:

{
“model”: “gpt-4o”,
“temperature”: 0,
“messages”: [
{
“role”: “assistant”,
“content”: “Some description on what OpenAI is supposed to do.”
},
{
“role”: “user”,
“content”: “Here’s a text from somewhere. Analyse and extract detail information.\n\n\{{ $(‘Scrape Site’).item.json.extractor.result.richTextClean }}”
}
],
“response_format”: {
“type”: “json_schema”,
“json_schema”: {
“name”: “some_name”,
“strict”: true,
“schema”: {
“type”: “object”,
“strict”: true,
“properties”: {
“date”: {
“type”: “string”,
“description”: “description which date I’m looking for”
},
“name”: {
“type”: “string”,
“description”: “description of the names I’m looking for”,
“valueExamples”: [
“Peter”,
“Maria”
]
}, …

Am I using the API wrongly? Is something missing in my JSON? Any advice would be greatly appreciated!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Laius

I cannot speak for make, but have you tried our Information Extractor node?

This node is even compatible with other models as well