8
n8n 한국어amn8n.com

의학 영상을 상세 보고서로 변환하는 변환기

중급

이것은Document Extraction, Multimodal AI분야의자동화 워크플로우로, 12개의 노드를 포함합니다.주로 Code, Wait, Gmail, Webhook, HttpRequest 등의 노드를 사용하며. GPT-4 Vision과 PDF 이메일을 사용하여 방사선 이미지를 환자 친화적인 보고서로 변환

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • HTTP Webhook 엔드포인트(n8n이 자동으로 생성)
  • 대상 API의 인증 정보가 필요할 수 있음
  • Google Sheets API 인증 정보
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "8DYI99J1q8APXjWY",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "Radiology Image to Detailed Report Converter",
  "tags": [],
  "nodes": [
    {
      "id": "89d05f4e-32c8-4ce2-aabb-26068052a70b",
      "name": "이미지 업로드 트리거",
      "type": "n8n-nodes-base.webhook",
      "position": [
        180,
        -120
      ],
      "webhookId": "radiology-upload-webhook",
      "parameters": {
        "path": "radiology-upload",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "395b8ea6-f7aa-4d47-a73c-22ab891674ec",
      "name": "이미지 데이터 추출",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        -120
      ],
      "parameters": {
        "jsCode": "// Extract image and patient data from webhook\nconst data = $input.first().json;\n\nreturn [{\n  json: {\n    patient_name: data.patient_name || 'Patient',\n    patient_id: data.patient_id || 'N/A',\n    scan_type: data.scan_type || 'X-Ray',\n    body_part: data.body_part || 'Chest',\n    image_url: data.image_url,\n    image_base64: data.image_base64,\n    doctor_name: data.doctor_name || 'Dr. Smith',\n    scan_date: data.scan_date || new Date().toISOString().split('T')[0],\n    urgency: data.urgency || 'routine'\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "090ab8d4-4e1c-4c23-9fe8-f6c74b850a8a",
      "name": "AI를 통한 방사선 이미지 분석",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        620,
        -120
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/chat/completions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"gpt-4-vision-preview\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a radiology expert who explains medical scans in simple, patient-friendly language. Analyze the radiology image and provide: 1) What the scan shows in simple terms 2) Any notable findings 3) What this means for the patient 4) Next steps if any. Be reassuring and avoid medical jargon. Always recommend consulting with their doctor.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"Please analyze this {{ $json.scan_type }} scan of the {{ $json.body_part }} and explain the findings in patient-friendly terms.\"\n        },\n        {\n          \"type\": \"image_url\",\n          \"image_url\": {\n            \"url\": \"{{ $json.image_base64 ? 'data:image/jpeg;base64,' + $json.image_base64 : $json.image_url }}\"\n          }\n        }\n      ]\n    }\n  ],\n  \"max_tokens\": 1000,\n  \"temperature\": 0.3\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{ $credentials.openaiApi.apiKey }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "47095b28-484a-47ce-b450-6dd0d719d989",
      "name": "AI 분석 처리",
      "type": "n8n-nodes-base.code",
      "position": [
        840,
        -120
      ],
      "parameters": {
        "jsCode": "// Process OpenAI response and structure the report data\nconst aiResponse = $input.first().json;\nconst patientData = $('Extract Image Data').first().json;\n\nconst aiAnalysis = aiResponse.choices[0].message.content;\n\n// Structure the analysis into sections\nconst sections = aiAnalysis.split('\\n\\n');\nlet findings = '';\nlet explanation = '';\nlet nextSteps = '';\n\n// Try to parse the AI response into structured sections\nsections.forEach(section => {\n  if (section.toLowerCase().includes('findings') || section.toLowerCase().includes('shows')) {\n    findings += section + ' ';\n  } else if (section.toLowerCase().includes('means') || section.toLowerCase().includes('indicates')) {\n    explanation += section + ' ';\n  } else if (section.toLowerCase().includes('next') || section.toLowerCase().includes('recommend')) {\n    nextSteps += section + ' ';\n  }\n});\n\n// If structured parsing didn't work well, use the full response\nif (!findings && !explanation) {\n  findings = aiAnalysis.substring(0, aiAnalysis.length / 2);\n  explanation = aiAnalysis.substring(aiAnalysis.length / 2);\n}\n\nreturn [{\n  json: {\n    ...patientData,\n    ai_analysis: aiAnalysis,\n    findings: findings.trim() || 'Analysis completed',\n    explanation: explanation.trim() || 'Please consult with your doctor for detailed explanation',\n    next_steps: nextSteps.trim() || 'Follow up with your healthcare provider as recommended',\n    report_generated: new Date().toISOString(),\n    confidence_note: 'This AI analysis is for informational purposes only. Always consult your doctor for medical advice.'\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "223aebb0-5f1e-40fb-bc00-ed70a4cba515",
      "name": "PDF 보고서 생성",
      "type": "n8n-nodes-base.code",
      "position": [
        1060,
        -120
      ],
      "parameters": {
        "jsCode": "// Generate HTML template for PDF conversion\nconst data = $input.first().json;\n\nconst htmlReport = `\n<!DOCTYPE html>\n<html>\n<head>\n    <style>\n        body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; margin: 40px; }\n        .header { text-align: center; border-bottom: 3px solid #4CAF50; padding-bottom: 20px; margin-bottom: 30px; }\n        .logo { font-size: 24px; font-weight: bold; color: #4CAF50; }\n        .patient-info { background-color: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0; }\n        .section { margin: 25px 0; }\n        .section-title { font-size: 18px; font-weight: bold; color: #2c3e50; border-left: 4px solid #4CAF50; padding-left: 15px; margin-bottom: 15px; }\n        .findings { background-color: #e8f5e8; padding: 20px; border-radius: 8px; border-left: 4px solid #4CAF50; }\n        .explanation { background-color: #fff3e0; padding: 20px; border-radius: 8px; border-left: 4px solid #ff9800; }\n        .next-steps { background-color: #e3f2fd; padding: 20px; border-radius: 8px; border-left: 4px solid #2196f3; }\n        .disclaimer { background-color: #ffebee; padding: 15px; border-radius: 8px; font-size: 14px; border: 1px solid #f44336; margin-top: 30px; }\n        .footer { text-align: center; margin-top: 40px; font-size: 12px; color: #666; }\n        .date { color: #666; font-size: 14px; }\n    </style>\n</head>\n<body>\n    <div class=\"header\">\n        <div class=\"logo\">🏥 Medical Imaging Report</div>\n        <h2>Patient-Friendly Radiology Report</h2>\n        <div class=\"date\">Generated: ${new Date(data.report_generated).toLocaleDateString()}</div>\n    </div>\n    \n    <div class=\"patient-info\">\n        <h3>👤 Patient Information</h3>\n        <p><strong>Patient Name:</strong> ${data.patient_name}</p>\n        <p><strong>Patient ID:</strong> ${data.patient_id}</p>\n        <p><strong>Scan Type:</strong> ${data.scan_type}</p>\n        <p><strong>Body Part:</strong> ${data.body_part}</p>\n        <p><strong>Scan Date:</strong> ${data.scan_date}</p>\n        <p><strong>Ordering Doctor:</strong> ${data.doctor_name}</p>\n    </div>\n    \n    <div class=\"section\">\n        <div class=\"section-title\">🔍 What We Found</div>\n        <div class=\"findings\">\n            <p>${data.findings}</p>\n        </div>\n    </div>\n    \n    <div class=\"section\">\n        <div class=\"section-title\">💡 What This Means</div>\n        <div class=\"explanation\">\n            <p>${data.explanation}</p>\n        </div>\n    </div>\n    \n    <div class=\"section\">\n        <div class=\"section-title\">📋 Next Steps</div>\n        <div class=\"next-steps\">\n            <p>${data.next_steps}</p>\n        </div>\n    </div>\n    \n    <div class=\"disclaimer\">\n        <h4>⚠️ Important Disclaimer</h4>\n        <p>${data.confidence_note}</p>\n        <p>This report is generated by AI technology to help you understand your scan results. It should not replace professional medical consultation. Please discuss these findings with your healthcare provider.</p>\n    </div>\n    \n    <div class=\"footer\">\n        <p>Report generated by AI-Powered Radiology Assistant</p>\n        <p>For medical questions, contact your healthcare provider</p>\n    </div>\n</body>\n</html>\n`;\n\nreturn [{\n  json: {\n    ...data,\n    html_report: htmlReport,\n    report_filename: `Radiology_Report_${data.patient_name.replace(/\\s+/g, '_')}_${data.scan_date}.pdf`\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "4deecdc3-3b5a-4987-a62d-43f7034431c2",
      "name": "PDF로 변환",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        -120
      ],
      "parameters": {
        "url": "https://api.html-css-to-pdf.com/v1/generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"html\": \"{{ $json.html_report }}\",\n  \"options\": {\n    \"format\": \"A4\",\n    \"margin\": {\n      \"top\": \"20mm\",\n      \"right\": \"15mm\",\n      \"bottom\": \"20mm\",\n      \"left\": \"15mm\"\n    },\n    \"displayHeaderFooter\": false\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer {{ $credentials.pdfApi.apiKey }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "581fef88-4096-4193-b71e-9893fd684d1f",
      "name": "보고서 데이터베이스 저장",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1720,
        -120
      ],
      "parameters": {
        "columns": {
          "value": {
            "pdf_url": "={{ $json.download_url }}",
            "body_part": "={{ $('Generate PDF Report').first().json.body_part }}",
            "scan_date": "={{ $('Generate PDF Report').first().json.scan_date }}",
            "scan_type": "={{ $('Generate PDF Report').first().json.scan_type }}",
            "timestamp": "={{ $now.toISO() }}",
            "patient_id": "={{ $('Generate PDF Report').first().json.patient_id }}",
            "patient_name": "={{ $('Generate PDF Report').first().json.patient_name }}",
            "report_status": "Generated Successfully"
          },
          "schema": [
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "patient_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Patient Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "patient_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Patient ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "scan_type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Scan Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "body_part",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Body Part",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "scan_date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Scan Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "report_status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Report Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "pdf_url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "PDF URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Reports_Log",
          "cachedResultName": "Reports Log"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_REPORTS_SHEET_ID",
          "cachedResultName": "Radiology Reports"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "ScSS2KxGQULuPtdy",
          "name": "Google Sheets- test"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "f2025595-5b43-48dd-a586-351054d7d6d3",
      "name": "환자에게 보고서 이메일 전송",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1940,
        -120
      ],
      "webhookId": "4a00c62f-eac2-46c6-9013-61a94e903084",
      "parameters": {
        "sendTo": "={{ $('Extract Image Data').first().json.patient_email || 'patient@example.com' }}",
        "message": "=<h2>Your Radiology Report is Ready! 🏥</h2><br><br>Dear {{ $('Generate PDF Report').first().json.patient_name }},<br><br>Your {{ $('Generate PDF Report').first().json.scan_type }} scan report is now available. This patient-friendly report explains your scan results in easy-to-understand language.<br><br><strong>Scan Details:</strong><br>• Type: {{ $('Generate PDF Report').first().json.scan_type }}<br>• Body Part: {{ $('Generate PDF Report').first().json.body_part }}<br>• Date: {{ $('Generate PDF Report').first().json.scan_date }}<br><br><strong>Key Findings:</strong><br>{{ $('Process AI Analysis').first().json.findings }}<br><br>📎 <strong>Your complete report is attached as a PDF.</strong><br><br>❗ <strong>Important:</strong> This AI-generated report is for informational purposes. Please discuss these results with {{ $('Generate PDF Report').first().json.doctor_name }} or your healthcare provider.<br><br>If you have any questions, please contact your healthcare provider.<br><br>Best regards,<br>Medical Imaging Department",
        "options": {},
        "subject": "🏥 Your Radiology Report is Ready - {{ $('Generate PDF Report').first().json.patient_name }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "PcTqvGU9uCunfltE",
          "name": "Gmail account - test"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "badb5a4d-2b43-47a9-b1c8-12db0f4e7a5b",
      "name": "응답 반환",
      "type": "n8n-nodes-base.code",
      "position": [
        2160,
        -120
      ],
      "parameters": {
        "jsCode": "// Return success response with report details\nconst reportData = $('Generate PDF Report').first().json;\nconst pdfData = $('Convert to PDF').first().json;\n\nreturn [{\n  json: {\n    status: 'success',\n    message: 'Radiology report generated successfully',\n    patient_name: reportData.patient_name,\n    scan_type: reportData.scan_type,\n    body_part: reportData.body_part,\n    report_generated: reportData.report_generated,\n    pdf_url: pdfData.download_url,\n    findings_summary: reportData.findings.substring(0, 200) + '...',\n    next_steps: reportData.next_steps,\n    disclaimer: reportData.confidence_note\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "7b5c9eb3-37c2-43f8-a0f1-f95554b6c9ef",
      "name": "워크플로우 개요",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        -600
      ],
      "parameters": {
        "width": 400,
        "height": 340,
        "content": "## 🏥 Radiology Image to Report Converter\n\n### Features:\n• AI-powered image analysis\n• Patient-friendly language\n• Professional PDF reports\n• Email delivery\n• Database logging\n• Webhook triggered\n\n### How to use:\nSend POST to webhook with image data"
      },
      "typeVersion": 1
    },
    {
      "id": "925f5199-dbac-427b-a896-228e864f524b",
      "name": "필요한 설정",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        -540
      ],
      "parameters": {
        "color": 3,
        "width": 300,
        "height": 200,
        "content": "## ⚙️ Setup Required\n\n1. OpenAI API credentials (GPT-4 Vision)\n2. PDF conversion service\n3. Gmail account for sending\n4. Google Sheets for logging\n5. Update YOUR_REPORTS_SHEET_ID"
      },
      "typeVersion": 1
    },
    {
      "id": "e5159a65-1ba2-4bc0-99dc-d89cef310932",
      "name": "PDF 대기",
      "type": "n8n-nodes-base.wait",
      "position": [
        1500,
        -120
      ],
      "webhookId": "25e9fc56-abe3-4dbc-9d2d-edcf098f8ecc",
      "parameters": {},
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "307925d2-0fa2-459f-a60c-af7b0ae0bbb3",
  "connections": {
    "e5159a65-1ba2-4bc0-99dc-d89cef310932": {
      "main": [
        [
          {
            "node": "581fef88-4096-4193-b71e-9893fd684d1f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4deecdc3-3b5a-4987-a62d-43f7034431c2": {
      "main": [
        [
          {
            "node": "e5159a65-1ba2-4bc0-99dc-d89cef310932",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "395b8ea6-f7aa-4d47-a73c-22ab891674ec": {
      "main": [
        [
          {
            "node": "090ab8d4-4e1c-4c23-9fe8-f6c74b850a8a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "223aebb0-5f1e-40fb-bc00-ed70a4cba515": {
      "main": [
        [
          {
            "node": "4deecdc3-3b5a-4987-a62d-43f7034431c2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "47095b28-484a-47ce-b450-6dd0d719d989": {
      "main": [
        [
          {
            "node": "223aebb0-5f1e-40fb-bc00-ed70a4cba515",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "89d05f4e-32c8-4ce2-aabb-26068052a70b": {
      "main": [
        [
          {
            "node": "395b8ea6-f7aa-4d47-a73c-22ab891674ec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f2025595-5b43-48dd-a586-351054d7d6d3": {
      "main": [
        [
          {
            "node": "badb5a4d-2b43-47a9-b1c8-12db0f4e7a5b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "581fef88-4096-4193-b71e-9893fd684d1f": {
      "main": [
        [
          {
            "node": "f2025595-5b43-48dd-a586-351054d7d6d3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "090ab8d4-4e1c-4c23-9fe8-f6c74b850a8a": {
      "main": [
        [
          {
            "node": "47095b28-484a-47ce-b450-6dd0d719d989",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급 - 문서 추출, 멀티모달 AI

유료인가요?

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

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

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Oneclick AI Squad

Oneclick AI Squad

@oneclick-ai

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34