AI doesn't recognize images

The AI ​​on the gpt node does not recognize images and does not return image analysis results. How can I solve this?

Share the output returned by the last node

{
“name”: “流動票をテキスト化”,
“nodes”: [
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “261d8002-88b3-44dc-bbf1-4ca7ff3025a6”,
“options”: {}
},
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 2.1,
“position”: [
0,
0
],
“id”: “c29ba48f-368f-4184-b7b7-a8d94a379f5d”,
“name”: “Webhook”,
“webhookId”: “261d8002-88b3-44dc-bbf1-4ca7ff3025a6”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “67e3b78f-c085-4c91-8ebc-1e522f683cf3”,
“leftValue”: “={{$binary.file.mimeType}}”,
“rightValue”: “=image/”,
“operator”: {
“type”: “string”,
“operation”: “startsWith”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
192,
-16
],
“id”: “866eaaff-d826-4ee1-82ef-c4d19f697204”,
“name”: “If”
},
{
“parameters”: {
“method”: “POST”,
“url”: “=https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “x-goog-api-key”,
“value”: “AIzaSyALPz-l7tnQ6rf99I6TQDqBJ3MxtZAiSQY”
}
]
},
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: “=={{ JSON.stringify({\n "contents": [\n {\n "parts": [\n {\n "text": "次の画像から読み取れる情報をJSONで返してください。スキーマ:{\"title\":\"文字列\",\"detected_text\":\"文字列\",\"labels\":[\"文字列\"],\"datetime\":\"YYYY-MM-DDThh:mm:ssZ\",\"notes\":\"文字列\"}。無い項目は空で。"\n },\n {\n "inline_data": {\n "mime_type": $binary.file.mimeType,\n "data": $binary.file.data\n }\n }\n ]\n }\n ],\n "generationConfig": { "response_mime_type": "application/json" }\n}) }}\n”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
80,
-240
],
“id”: “6171ab83-b91a-46c9-ac9d-dc827be50c65”,
“name”: “HTTP Request”
},
{
“parameters”: {
“resource”: “image”,
“operation”: “analyze”,
“modelId”: {
“__rl”: true,
“value”: “gpt-4o-mini”,
“mode”: “list”,
“cachedResultName”: “GPT-4O-MINI”
},
“text”: “=♯命令:\nユーザーが入力した票を読み取り以下の内容を入力フォーマットに合わせて、コマンドブロックでjson形式で出力せよ。なお、書かれていない、読み取れない情報は空欄にせよ。”画像の拡大処理をしないでください””pythonを使わないでください””入力フォーマットを絶対に崩さないでください\n\n♯♯♯内容1(基本情報)(タイトルの周りに書かれている内容)\n\n発行日、客先の担当者(”流動票”というタイトルの下に書かれている)、流動票番号(右の方に書かれているNo.以降の数字)\n\n♯♯♯内容2(管理部門記入欄の内容)\n\n会社名、製品名、図面番号、発送日、分納期1、分納期2、材質、フライス(6Fまたは4Fまたは2F)購入先、材料寸法(縦、横、高さ)、個数、新規受注品かリピート品か、製造か設計か転売か、注文数、作成者、関与した業者とその役割、材料価格、外注価格、工程の注意点、図面問い合わせ内容、解答、販売単価、いつ、だれが、誰に確認、処理の有無、多台待ち(1か2か3を記入)\n\n###入力フォーマット\n{\n "基本情報": {\n "発行日": "25-09-01",\n "客先の担当者": "田中一郎",\n "流動票番号": "12345"\n },\n "管理部門記入欄": {\n "会社名": "サンプル株式会社",\n "製品名": "試作品A",\n "図面番号": "DWG-001",\n "発送日": "09-05",\n "分納期1": "09-10",\n "分納期2": "09-20",\n "材質": "S45C",\n "フライス": "6F",\n "購入先": "AAA商事",\n "材料寸法": {\n "縦": "100mm",\n "横": "200mm",\n "高さ": "50mm"\n },\n "個数": 20,\n "新規受注品かリピート品か": "新規受注品",\n "製造か設計か転売か": "製造",\n "注文数": 50,\n "作成者": "佐藤花子",\n "関与業者": [\n {\n "業者名": "XYZ加工所",\n "役割": "機械加工"\n },\n {\n "業者名": "DEF検査",\n "役割": "品質検査"\n }\n ],\n "材料価格": 5000,\n "外注価格": 80000,\n "工程の注意点": "バリ取りを確実に行うこと",\n "図面問い合わせ内容": "寸法公差の範囲確認",\n "解答": "±0.05mm",\n "販売単価": 4000,\n "確認履歴": [\n {\n "いつ": "09-02",\n "だれが": "山田太郎",\n "誰に": "田中一郎",\n "処理の有無": "処理済み"\n }\n ],\n "多台待ち": "1"\n }\n }{{ $binary.file[‘2025-09-08 203721.png’] }}”,
“inputType”: “base64”,
“binaryPropertyName”: “=data”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“typeVersion”: 1.8,
“position”: [
432,
-64
],
“id”: “0fe67338-edc3-4432-b704-3136a89aac4a”,
“name”: “Analyze image”,
“credentials”: {
“openAiApi”: {
“id”: “q0o0iTHdrU1MfLbc”,
“name”: “n8n free OpenAI API credits”
}
}
}
],
“pinData”: {},
“connections”: {
“Webhook”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
[
{
“node”: “Analyze image”,
“type”: “main”,
“index”: 0
}
],

]
}
},
“active”: false,
“settings”: {
“executionOrder”: “v1”
},
“versionId”: “09cad0c2-73c6-43c2-a43e-2753e258b4a8”,
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “c6ed978e8089365198ed4a3eda3b03940015ccc391fb4748015dfce88a447460”
},
“id”: “gQqdRRYBLA3701Cq”,
“tags”:
}

n8n Configuration Information

n8n Version: Latest

Database (Default: SQLite): Probably Default

n8n EXECUTIONS_PROCESS Setting (Default: own, main): Probably Default

n8n Execution Method (Docker, npm, n8n Cloud, Desktop App): n8n Cloud

Operating System: Windows

hey @youmayitian welcome to n8n community!

can you share more information on this error?
it is difficult to understand just from workflow. may be share sample image(if you can) so we can test it

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.