8
n8n 中文网amn8n.com

从Google Drive提取医疗报告并生成AI健康建议

高级

这是一个自动化工作流,包含 21 个节点。主要使用 If, Code, MistralAi, GoogleDrive, GoogleSheets 等节点。 使用Mistral AI和GPT-4提取医疗报告并生成AI健康建议

前置要求
  • Google Drive API 凭证
  • Google Sheets API 凭证
  • OpenAI API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "tUEm5XYFpv149YVQ",
  "name": "从 Google Drive 提取医疗报告并生成 AI 健康建议",
  "tags": [],
  "nodes": [
    {
      "id": "a6a3e84a-be97-4579-ae73-8e3f1f26f4cf",
      "name": "下载文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1024,
        464
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "057e8d68-e51d-45fb-96c3-6aa45e2a2690",
      "name": "合并页面 Markdown",
      "type": "n8n-nodes-base.code",
      "position": [
        1840,
        304
      ],
      "parameters": {
        "jsCode": "// Merge markdown from all pages (works for any number of pages)\nconst pages = $json.pages;\nlet combinedMarkdown = \"\";\n\nfor (let i = 0; i < pages.length; i++) {\n  if (pages[i]?.markdown) {\n    combinedMarkdown += pages[i].markdown + \"\\n\";\n  }\n}\n\nreturn [{ json: { combined_markdown: combinedMarkdown } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "d6af767c-c86e-4778-b604-122b48e91231",
      "name": "将 AI 输出解析为每行一条记录",
      "type": "n8n-nodes-base.code",
      "position": [
        2192,
        288
      ],
      "parameters": {
        "jsCode": "const input = $input.first();\nlet data = input.json.message.content || input.json.content || input.json;\n\n// Remove markdown ``` or ```\nif (typeof data === 'string') {\n  data = data.replace(/```+[\\w]*\\s*/g, '').trim();\n}\n\n// Parse JSON\ntry {\n  data = JSON.parse(data);\n} catch (err) {\n  return [{\n    json: {\n      error: \"Failed to parse JSON\",\n      message: err.message,\n      raw: typeof data === 'string' ? data.substring(0, 500) : ''\n    }\n  }];\n}\n\n// Validate array\nif (!Array.isArray(data)) {\n  return [{\n    json: {\n      error: \"Parsed data is not an array\",\n      data\n    }\n  }];\n}\n\n// Map each array entry into a separate n8n item\nreturn data.map(item => {\n  // Clean reference interval: keep only numbers, hyphens, dots, spaces\n  let ref = item.reference_range || 'N/A';\n  if (ref && ref !== 'N/A') {\n    ref = ref.replace(/[^0-9.\\- ]/g, '').replace(/\\s*-\\s*/g, ' - ').replace(/\\s+/g, ' ').trim();\n  }\n  return {\n    json: {\n      'Diagnostic Centre': item.diagnostic_centre || 'N/A',\n      'Name': item.patient_name || 'N/A',\n      'Age': item.age || 'N/A',\n      'Gender': item.gender || 'N/A',\n      'Registered on': item.registration_date || 'N/A',\n      'Sample Type': item.sample_type || 'N/A',\n      'Test Name': item.test_name || 'N/A',\n      'Result': item.result_value !== undefined ? String(item.result_value) : 'N/A',\n      'Unit': item.unit || 'N/A',\n      'Biological reference Interval': ref\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "280f592d-9b76-4653-8a5c-2292004bda36",
      "name": "超出范围检测与建议字段",
      "type": "n8n-nodes-base.code",
      "position": [
        2416,
        288
      ],
      "parameters": {
        "jsCode": "function isOutOfRange(result, ref) {\n  if (!result || !ref) return false;\n  // strip units, trim spaces\n  let val = parseFloat((result + '').replace(/[^0-9.\\-]/g, ''));\n  let match = ref.match(/^\\s*(\\d+\\.?\\d*)\\s*-\\s*(\\d+\\.?\\d*)/); // \"0.3-1.2\" etc.\n  if (match) {\n    let low = parseFloat(match[1]);\n    let high = parseFloat(match[2]);\n    return (val < low || val > high);\n  }\n  if (ref.match(/^<\\s*(\\d+)/)) {\n    let high = parseFloat(ref.match(/^<\\s*(\\d+)/)[1]);\n    return (val >= high);\n  }\n  if (ref.match(/^>\\s*(\\d+)/)) {\n    let low = parseFloat(ref.match(/^>\\s*(\\d+)/)[1]);\n    return (val <= low);\n  }\n  return false; // fallback\n}\n\nlet outOfRangeItems = [];\nfor (let item of items) {\n  item.json['Dietary advice'] = '';\n  item.json['Lifestyle advice'] = '';\n  item.json['Exercise advice'] = '';\n  if (isOutOfRange(item.json['Result'], item.json['Biological reference Interval'])) {\n    outOfRangeItems.push(item);\n  }\n}\nreturn outOfRangeItems; // This will go to the AI node for advice\n"
      },
      "typeVersion": 2
    },
    {
      "id": "3e152598-d727-482a-99ca-a38d658dee9c",
      "name": "合并 AI 响应回传",
      "type": "n8n-nodes-base.code",
      "position": [
        2768,
        288
      ],
      "parameters": {
        "jsCode": "// Merge AI Response Back - SIMPLE VERSION\n// Assumes AI responses are in the same order as out-of-range items\n\nconsole.log('=== SIMPLE MERGE START ===');\n\nconst aiItems = items; // AI advice responses\nconst allRows = $('Out-of-Range Detection & Advice Fields').all();\n\nconsole.log('AI items:', aiItems.length);\nconsole.log('Medical rows:', allRows.length);\n\n// Process each row\nfor (let i = 0; i < allRows.length; i++) {\n  const row = allRows[i];\n  \n  let dietary = '';\n  let lifestyle = '';\n  let exercise = '';\n  \n  // If we have AI advice for this index\n  if (i < aiItems.length) {\n    const ai = aiItems[i];\n    \n    // Get content from various possible locations\n    let content = ai.json.content || ai.json.message?.content || ai.json.text || '';\n    \n    if (content) {\n      try {\n        // Remove code fences\n        content = content.replace(/```(?:json)?\\s*/g, '').replace(/```/g, '').trim();\n        \n        // Parse JSON\n        const obj = JSON.parse(content);\n        \n        dietary = obj[\"Dietary advice\"] || obj[\"dietary_advice\"] || '';\n        lifestyle = obj[\"Lifestyle advice\"] || obj[\"lifestyle_advice\"] || '';\n        exercise = obj[\"Exercise advice\"] || obj[\"exercise_advice\"] || '';\n        \n        console.log(`Row ${i}: Successfully extracted advice`);\n        \n      } catch (err) {\n        console.error(`Row ${i}: Parse error -`, err.message);\n      }\n    }\n  }\n  \n  row.json['Dietary advice'] = dietary;\n  row.json['Lifestyle advice'] = lifestyle;\n  row.json['Exercise advice'] = exercise;\n}\n\nconsole.log('=== SIMPLE MERGE COMPLETE ===');\nreturn allRows;"
      },
      "typeVersion": 2
    },
    {
      "id": "a62dfcf0-a9b0-443d-bf87-51c58e34662b",
      "name": "上传 PDF/JPEG 文件到 Google Drive",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "notes": "Folder ID is referenced from the 'Workflow User Configuration'\nFolder ID is read from workflow variable `GOOGLE_DRIVE_FOLDER_ID` (set via Workflow → Settings → Variables). You can also replace the expression directly in this field.",
      "position": [
        1008,
        176
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": {
            "mode": "list",
            "value": "1mPJiZ...<your-folder-id-here>"
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "31350988-e198-493d-83c6-4cb3e6a832f7",
      "name": "从图像提取",
      "type": "n8n-nodes-base.mistralAi",
      "position": [
        1584,
        368
      ],
      "parameters": {
        "options": {},
        "documentType": "image_url"
      },
      "typeVersion": 1
    },
    {
      "id": "1addfa9f-7104-4da5-a78b-a4dd98e40843",
      "name": "检查是否为 PDF 或图像",
      "type": "n8n-nodes-base.if",
      "position": [
        1296,
        272
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "aad49b11-5871-422b-818f-431e53e9844f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Upload pdf/jpeg file to Google drive').item.json.mimeType }}",
              "rightValue": "application/pdf"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8fa34cb4-3775-49a7-9276-497c11988a6c",
      "name": "从 PDF 提取",
      "type": "n8n-nodes-base.mistralAi",
      "position": [
        1584,
        176
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "39376374-069f-4566-b06d-683154afe334",
      "name": "提取医疗数据(AI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1952,
        64
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are an expert medical data extraction assistant specializing in diagnostic reports. Your role is to accurately identify and extract EVERY measurable test result (including all sub-parameters of multi-test panels like LFT, Haemogram, Lipid Profile, etc.) in a granular and structured fashion, for each page of the provided document.\nReturn only pure, valid JSON and ensure your output is reliable for direct ingestion by downstream data pipelines.\n"
            },
            {
              "role": "user",
              "content": "=Extract ALL individual test results (including every sub-parameter of multi-panel tests such as Liver Function Test, Haemogram, etc.) from the ENTIRE provided document. \n\nOutput instructions:\n- For EACH test or parameter, create a JSON object with these fields: \n  - diagnostic_centre: Name of the diagnostic center\n  - patient_name: Full patient name\n  - age: age of the patient in Years\n  - gender: gender of the patient\n  - registration_date: Registration date (DD-MMM-YYYY)\n  - sample_type: Type of sample (e.g., Serum, Plasma, Urine)\n  - test_name: Name of the specific test/parameter (e.g., 'Total Bilirubin', 'SGPT', 'Hemoglobin', etc.)\n  - result_value: Result value (only the numeric or string value, no additional text)\n  - unit: Unit of measurement, if present (e.g., mg/dL, g/L, etc.)\n  - reference_range: Normal reference range, if present\n\n- Return ONLY a valid JSON array of all detected test results/parameters. \n- Do not include any markdown, formatting, or code blocks—just the raw JSON array.\n- If a field is missing for a parameter, output an empty string (\"\").\n\nExample:\n[\n  {\n    \"diagnostic_centre\": \"VIJAYA DIAGNOSTIC CENTRE\",\n    \"patient_name\": \"Mr.XYZ\",\n    \"age\": \"58 Years\",\n    \"gender\": \"Male\",\n    \"registration_date\": \"26-Jan-2024\",\n    \"sample_type\": \"Fluoride Plasma\",\n    \"test_name\": \"Post Lunch Glucose\",\n    \"result_value\": \"236\",\n    \"unit\": \"mg/dL\",\n    \"reference_range\": \"100-140\"\n  },\n  {\n    \"diagnostic_centre\": \"VIJAYA DIAGNOSTIC CENTRE\",\n    \"patient_name\": \"Mr.XYZ\",\n    \"age\": \"58 Years\",\n    \"gender\": \"Male\",\n    \"registration_date\": \"26-Jan-2024\",\n    \"sample_type\": \"Serum\",\n    \"test_name\": \"Total Bilirubin\",\n    \"result_value\": \"0.8\",\n    \"unit\": \"mg/dL\",\n    \"reference_range\": \"0.3-1.2\"\n  }\n]\n\nReference {{ $json.combined_markdown }} to provide the full multi-page text as input.\n\n\nExtract every possible test entry into a single JSON array, without markdown, code fences, or comments. Every result/parameter from every page must be present as a separate object.\n"
            }
          ]
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "395f545b-2c39-4fe5-824c-56196d5c5b19",
      "name": "通用健康建议(AI)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2528,
        80
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a physician-reviewed expert assistant specializing in actionable, personalized wellness guidance based on lab test results."
            },
            {
              "content": "=For this out-of-range medical lab result:\n\nPatient: {{ $json.Name }}\nAge :{{ $json.Age }}\nGender:{{ $json.Gender }}\nTest Name: {{ $json['Test Name'] }}\nResult: {{ $json.Result }} {{ $json.Unit }}\nReference Range: {{ $json['Biological reference Interval'] }}\n\nPlease provide:\n- A two-sentence dietary/nutritional advice\n- A two-sentence lifestyle change suggestion\n- A two-sentence exercise recommendation\n\nReturn your answer ONLY as the following JSON object:\n{\n  \"Dietary advice\": \"...\",\n  \"Lifestyle advice\": \"...\",\n  \"Exercise advice\": \"...\"\n}\nDo not add any additional commentary."
            }
          ]
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "2e4e4a02-0492-4a27-bcd5-d22090a7e210",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        -80
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "height": 448,
        "content": "## Google Drive 触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "7077505f-39be-426e-bb8c-f39235900794",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        384
      ],
      "parameters": {
        "color": 3,
        "height": 448,
        "content": "## 下载文件"
      },
      "typeVersion": 1
    },
    {
      "id": "713f9373-6461-4a1d-838a-e94b90e72e97",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        48
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 544,
        "content": "## 检查是否为 PDF/图像"
      },
      "typeVersion": 1
    },
    {
      "id": "79fb1da0-1c7a-4e9e-8588-a606227b02b7",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        -80
      ],
      "parameters": {
        "color": 6,
        "width": 288,
        "height": 896,
        "content": "## 从 PDF 提取"
      },
      "typeVersion": 1
    },
    {
      "id": "c53123e0-f5a3-4e8e-af19-0838a3393c0a",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1792,
        -80
      ],
      "parameters": {
        "color": 4,
        "width": 560,
        "height": 896,
        "content": "## 提取医疗数据(AI)"
      },
      "typeVersion": 1
    },
    {
      "id": "83ee4286-c175-45a0-86b4-e8b997c72f6a",
      "name": "保存超出范围结果",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3024,
        288
      ],
      "parameters": {
        "sheet": {
          "mode": "name",
          "value": {
            "mode": "name",
            "value": "Out of Range Values"
          }
        },
        "columns": {
          "value": {
            "Age": "={{ $json.Age }}",
            "Name": "={{ $json.Name }}",
            "Unit": "={{ $json.Unit }}",
            "Gender": "={{ $json.Gender }}",
            "Result": "={{ $json.Result }}",
            "Test Name": "={{ $json['Test Name'] }}",
            "Sample Type": "={{ $json['Sample Type'] }}",
            "Dietary advice": "={{ $json['Dietary advice'] }}",
            "Registered \non": "={{ $json['Registered on'] }}",
            "Exercise advice": "={{ $json['Exercise advice'] }}",
            "Lifestyle advice": "={{ $json['Lifestyle advice'] }}",
            "Diagnostic Centre": "={{ $json['Diagnostic Centre'] }}",
            "Biological \nreference Interval": "={{ $json['Biological reference Interval'] }}"
          },
          "schema": [
            {
              "id": "Diagnostic Centre",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Diagnostic Centre",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Age",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Age",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Gender",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Gender",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Registered \non",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Registered \non",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sample Type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Sample Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Test Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Test Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Result",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Unit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Unit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Biological \nreference Interval",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Biological \nreference Interval",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Dietary advice",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Dietary advice",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Lifestyle advice",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Lifestyle advice",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Exercise advice",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Exercise advice",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "documentId": ""
      },
      "typeVersion": 4.7
    },
    {
      "id": "50454400-4968-4e6e-adb5-4afe3cea01ec",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2368,
        -80
      ],
      "parameters": {
        "color": 4,
        "width": 560,
        "height": 896,
        "content": "## 生成健康建议(AI)"
      },
      "typeVersion": 1
    },
    {
      "id": "edbfa3ba-e4de-41d0-8e73-3026a882033f",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2944,
        -80
      ],
      "parameters": {
        "color": 2,
        "width": 288,
        "height": 928,
        "content": "## 保存超出范围结果"
      },
      "typeVersion": 1
    },
    {
      "id": "49a1f385-e91e-4047-808d-5b9134050339",
      "name": "保存所有测试结果",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3040,
        512
      ],
      "parameters": {
        "sheet": {
          "mode": "name",
          "value": {
            "mode": "name",
            "value": "All Values"
          }
        },
        "columns": {
          "value": {
            "Age": "={{ $json.Age }}",
            "Name": "={{ $json.Name }}",
            "Unit": "={{ $json.Unit }}",
            "Result": "={{ $json.Result }}",
            "Test Name": "={{ $json['Test Name'] }}",
            "Sample Type": "={{ $json['Sample Type'] }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Age",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Age",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sample Type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Sample Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Test Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Test Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Result",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Unit",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Unit",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Biological \nreference Interval",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Biological \nreference Interval",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "documentId": ""
      },
      "typeVersion": 4.7
    },
    {
      "id": "e7472172-098d-4a68-811b-89c593545003",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -80
      ],
      "parameters": {
        "width": 640,
        "height": 912,
        "content": "## 立即试用!"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Download file": {
      "main": [
        [
          {
            "node": "Check if PDF or Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from PDF": {
      "main": [
        [
          {
            "node": "Combine page Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from Image": {
      "main": [
        [
          {
            "node": "Combine page Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if PDF or Image": {
      "main": [
        [
          {
            "node": "Extract from PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract from Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine page Markdown": {
      "main": [
        [
          {
            "node": "Extract Medical Data (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge AI Response Back": {
      "main": [
        [
          {
            "node": "Save Out-of-Range Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Medical Data (AI)": {
      "main": [
        [
          {
            "node": "Parse AI output to one-per-row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "General Health Advice(AI)": {
      "main": [
        [
          {
            "node": "Merge AI Response Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI output to one-per-row": {
      "main": [
        [
          {
            "node": "Out-of-Range Detection & Advice Fields",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save All Test Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload pdf/jpeg file to Google drive": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Out-of-Range Detection & Advice Fields": {
      "main": [
        [
          {
            "node": "General Health Advice(AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量21
分类-
节点类型8
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Sridevi Edupuganti

Sridevi Edupuganti

@edupuganti

I help customers experience 10x faster ROI through AI Automation. AI Generalist | Pursuing Generative AI & ML(IIT-G) | Google Certified Prompt Engineer | Ex-VP | Ex-Microsoft | ISB Certified CTO & AI Leader | Azure & AI Strategist | 5X Azure | n8n level2 | Wellness Advocate & Cult Ninja

外部链接
在 n8n.io 查看

分享此工作流