8
n8n 한국어amn8n.com

AI 의료 보고서 생성기

고급

이것은Document Extraction, AI Summarization분야의자동화 워크플로우로, 21개의 노드를 포함합니다.주로 Set, Code, Gmail, GoogleDocs, GoogleDrive 등의 노드를 사용하며. Gemini AI와 Google Workspace를 사용하여 이메일에서 의료 보고서 생성

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • Google Drive API 인증 정보
  • 대상 API의 인증 정보가 필요할 수 있음
  • Google Sheets API 인증 정보
  • Google Gemini API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "iKLz8kl2wKbZDjdk",
  "meta": {
    "instanceId": "7f1a0694161455be3a7e71f1e0dea04908b0376a1a81e3a0c1e5ac879d48f83a"
  },
  "name": "AI Medical Report Generator",
  "tags": [],
  "nodes": [
    {
      "id": "91a19c78-df6d-42b2-85d7-abc7869b8942",
      "name": "Gmail 트리거",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -528,
        96
      ],
      "parameters": {
        "simple": false,
        "filters": {
          "sender": "your-doctor-email@example.com"
        },
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "OVQrwg5oLZomwQcs",
          "name": "Gmail account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "baa74409-0c1a-4bc9-8f84-a4af654509ff",
      "name": "필드 편집",
      "type": "n8n-nodes-base.set",
      "notes": "🛠 *Extracts the raw email content* into a new field called `content` for AI processing.",
      "position": [
        -240,
        96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d4b7d4b4-3daa-4804-bf99-fadfed1b7bb2",
              "name": "content",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f4b76891-0cbe-4dab-a1f2-f2ce347f6d73",
      "name": "시트에 행 추가",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        656,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $json.date }}",
            "Diagnoses": "={{ $json.diagnosis }}",
            "Patient Name": "={{ $json.patient_name }}",
            "Doctor's Name": "={{ $json.doctor_name }}",
            "Patient Phone Num.": "={{ $json.phone_number }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Patient Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Patient Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Patient Phone Num.",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Patient Phone Num.",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Doctor's Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Doctor's Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Diagnoses",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Diagnoses",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description ",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Description ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Attachments",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Attachments",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 12488983,
          "cachedResultUrl": "https://your-google-sheet-url/d/1EZgjpZ2B1umVImyMItfaHRn7Gi2T-y9etYmUNQZNiRw/edit#gid=12488983",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1EZgjpZ2B1umVImyMItfaHRn7Gi2T-y9etYmUNQZNiRw",
          "cachedResultUrl": "https://your-google-sheet-url/d/1EZgjpZ2B1umVImyMItfaHRn7Gi2T-y9etYmUNQZNiRw/edit?usp=drivesdk",
          "cachedResultName": "your-sheet-name"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "f5DnmArZjB6jGZsb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "f64e9b78-dc5d-4556-8322-1175a33dd062",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        0,
        0
      ],
      "parameters": {
        "text": "=Extract the following details from the input below and return them in raw JSON format:\n\n- patient_name  \n- doctor_name (if not found, return null)  \n- diagnosis  \n- phone_number (must start with 0111)  \n- date (use today’s date in YYYY-MM-DD format)\n\nINPUT:\n{{ $json.content }}\n\nRespond ONLY with JSON like this:\n{\n  \"patient_name\": \"john doe\",\n  \"doctor_name\": null,\n  \"diagnosis\": \"diaria\",\n  \"phone_number\": \"0111xxxxxxx\",\n  \"date\": \"2025-07-21\"\n}\n",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.1
    },
    {
      "id": "d0efc2af-649e-40b8-8dd9-eeeecdfaf488",
      "name": "Google Gemini 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "notes": "⚙️ *Specifies the AI model* (Gemini) used by the AI Agent for text understanding.",
      "position": [
        -48,
        288
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash-lite"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "sveFXq4gBIkY17aH",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "63c7245b-1c50-45ad-a136-075e92eec522",
      "name": "코드",
      "type": "n8n-nodes-base.code",
      "position": [
        352,
        0
      ],
      "parameters": {
        "jsCode": "const rawOutput = $json[\"output\"];\n\n// Remove ```json ... ``` if it exists\nconst cleaned = rawOutput.replace(/```json\\n?|```/g, \"\").trim();\n\nconst parsed = JSON.parse(cleaned);\n\nreturn [\n  {\n    json: parsed\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "8d11f752-f45c-4b55-b586-d16ad75ae194",
      "name": "문서1 업데이트",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1216,
        0
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "rows": 2,
              "action": "insert",
              "object": "table",
              "columns": 2
            },
            {
              "text": "{{date}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Append row in sheet').item.json.Date }}"
            },
            {
              "rows": 3,
              "action": "insert",
              "object": "table",
              "columns": 3
            },
            {
              "text": "{{patient_name}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Append row in sheet').item.json['Patient Name'] }}"
            }
          ]
        },
        "operation": "update",
        "documentURL": "https://your-google-doc-url/d/1UzqfWelQRYC_i9Q_7snYJ8h67b3-qfLK9YxGiKgl25k/edit?tab=t.0"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "id": "rV6dJKMg47R7CTiD",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ed90c89e-c092-4e07-95ae-a2a229bb994a",
      "name": "파일 복사",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        960,
        0
      ],
      "parameters": {
        "name": "=your-doc-template-name -  {{ $json['Patient Name'] }}",
        "fileId": {
          "__rl": true,
          "mode": "list",
          "value": "1UzqfWelQRYC_i9Q_7snYJ8h67b3-qfLK9YxGiKgl25k",
          "cachedResultUrl": "https://your-google-doc-url/d/1UzqfWelQRYC_i9Q_7snYJ8h67b3-qfLK9YxGiKgl25k/edit?usp=drivesdk",
          "cachedResultName": "your-doc-template-name"
        },
        "options": {},
        "operation": "copy"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "0BHskfXCrCwPuBL0",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "472e8004-5605-4275-9975-e2bfe105a517",
      "name": "메시지 보내기",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2016,
        0
      ],
      "webhookId": "16e8b9db-f57a-4f9b-80d8-1300f57fcdc3",
      "parameters": {
        "sendTo": "recipient@example.com",
        "message": "Please find the your-doc-template-name attached",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {}
            ]
          }
        },
        "subject": "=your-doc-template-name -  {{ $('Code').item.json.patient_name }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "OVQrwg5oLZomwQcs",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "52c9ce22-4874-4d5b-a75f-e620a4c0c6e0",
      "name": "HTTP 요청",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1504,
        0
      ],
      "parameters": {
        "url": "=https://www.googleapis.com/drive/v3/files/{{ $node[\"Copy file\"].json[\"id\"] }}/export?mimeType=application/pdf\n",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {}
          ]
        },
        "nodeCredentialType": "googleDriveOAuth2Api"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "0BHskfXCrCwPuBL0",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6ac43c97-8545-4811-b304-44e053b61071",
      "name": "코드1",
      "type": "n8n-nodes-base.code",
      "position": [
        1760,
        0
      ],
      "parameters": {
        "jsCode": "const patientName = $node[\"HTTP Request\"].json.patientName;\nconst dateStr = new Date().toISOString().split('T')[0];  // e.g. \"2025-07-21\"\nitems[0].binary.data.fileName = `${$('Append row in sheet').first().json['Patient Name']}_${dateStr}.pdf`;\nitems[0].binary.data.mimeType = 'application/pdf';\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "6aa03f0e-dff0-4f33-943b-064c499863a9",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -160
      ],
      "parameters": {
        "color": 3,
        "content": "🔔 *Triggers* the workflow when a new email is received from a specific sender (e.g. a doctor)."
      },
      "typeVersion": 1
    },
    {
      "id": "14165e9d-eff7-40a6-b035-390de5c430b2",
      "name": "스티커 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -160
      ],
      "parameters": {
        "color": 5,
        "content": "🛠 *Extracts the raw email content* into a new field called `content` for AI processing."
      },
      "typeVersion": 1
    },
    {
      "id": "f2adb4f2-1fd2-4e91-99cc-929f3b158dcb",
      "name": "스티커 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -176
      ],
      "parameters": {
        "color": 4,
        "content": "🤖 *Processes the text using AI* to extract structured information like patient name, doctor name, etc."
      },
      "typeVersion": 1
    },
    {
      "id": "6f55af2f-ac25-4462-be9e-6284fd1fdbf6",
      "name": "스티커 노트3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -176
      ],
      "parameters": {
        "color": 3,
        "content": "🧹 *Cleans and parses* the AI response by removing markdown code formatting and turning it into usable JSON."
      },
      "typeVersion": 1
    },
    {
      "id": "d93463fb-9399-4c51-bec9-26d29bd161b0",
      "name": "스티커 노트4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -176
      ],
      "parameters": {
        "color": 5,
        "content": "📄 *Adds the extracted data* (patient info, diagnosis, etc.) to a specific Google Sheet row."
      },
      "typeVersion": 1
    },
    {
      "id": "c8176919-4a09-4330-a481-6de25440845f",
      "name": "스티커 노트5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -176
      ],
      "parameters": {
        "color": 3,
        "content": "📁 *Makes a copy* of the Google Docs medical report template for the current patient."
      },
      "typeVersion": 1
    },
    {
      "id": "28dd3b51-feba-4981-8b4b-156f3dedbb07",
      "name": "스티커 노트6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        -176
      ],
      "parameters": {
        "color": 5,
        "content": "📝 *Replaces placeholders* (like patient name/date) in the copied Google Doc with real data."
      },
      "typeVersion": 1
    },
    {
      "id": "a966576b-0bfe-4d03-acbe-8475c93c3a9e",
      "name": "스티커 노트7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        -176
      ],
      "parameters": {
        "color": 3,
        "content": "📤 *Exports the updated Google Doc* as a PDF via Google Drive API."
      },
      "typeVersion": 1
    },
    {
      "id": "7853e5d4-27e0-4b7e-beed-a85704f5fd4e",
      "name": "스티커 노트8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -176
      ],
      "parameters": {
        "color": 5,
        "content": "📛 *Renames the PDF file* using patient name and date, and attaches metadata."
      },
      "typeVersion": 1
    },
    {
      "id": "f9504b84-ce1a-4dca-8378-fc8bf4183bfa",
      "name": "스티커 노트9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        -176
      ],
      "parameters": {
        "content": "✉️ *Sends the final PDF* (medical report) to the recipient via Gmail."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "389f4f89-16fb-4cce-8d2e-e4f031b7fdfc",
  "connections": {
    "63c7245b-1c50-45ad-a136-075e92eec522": {
      "main": [
        [
          {
            "node": "f4b76891-0cbe-4dab-a1f2-f2ce347f6d73",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6ac43c97-8545-4811-b304-44e053b61071": {
      "main": [
        [
          {
            "node": "472e8004-5605-4275-9975-e2bfe105a517",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f64e9b78-dc5d-4556-8322-1175a33dd062": {
      "main": [
        [
          {
            "node": "63c7245b-1c50-45ad-a136-075e92eec522",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ed90c89e-c092-4e07-95ae-a2a229bb994a": {
      "main": [
        [
          {
            "node": "8d11f752-f45c-4b55-b586-d16ad75ae194",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "baa74409-0c1a-4bc9-8f84-a4af654509ff": {
      "main": [
        [
          {
            "node": "f64e9b78-dc5d-4556-8322-1175a33dd062",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "52c9ce22-4874-4d5b-a75f-e620a4c0c6e0": {
      "main": [
        [
          {
            "node": "6ac43c97-8545-4811-b304-44e053b61071",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "91a19c78-df6d-42b2-85d7-abc7869b8942": {
      "main": [
        [
          {
            "node": "baa74409-0c1a-4bc9-8f84-a4af654509ff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8d11f752-f45c-4b55-b586-d16ad75ae194": {
      "main": [
        [
          {
            "node": "52c9ce22-4874-4d5b-a75f-e620a4c0c6e0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f4b76891-0cbe-4dab-a1f2-f2ce347f6d73": {
      "main": [
        [
          {
            "node": "ed90c89e-c092-4e07-95ae-a2a229bb994a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d0efc2af-649e-40b8-8dd9-eeeecdfaf488": {
      "ai_languageModel": [
        [
          {
            "node": "f64e9b78-dc5d-4556-8322-1175a33dd062",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 문서 추출, AI 요약

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수21
카테고리2
노드 유형11
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

저자
Abdullah Alshiekh

Abdullah Alshiekh

@abdullah01

🚀 Automation pro building AI-powered workflows with n8n. 💼 Special focus on real use cases 🔧 Love clean, flexible, and business-ready automations.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34