8
n8n 한국어amn8n.com

AI 증상 검사와 의사 추천

중급

이것은Support Chatbot, Multimodal AI분야의자동화 워크플로우로, 15개의 노드를 포함합니다.주로 If, Code, Webhook, EmailSend, HttpRequest 등의 노드를 사용하며. Ollama AI와 WhatsApp을 사용한 의료 증상 분석 및 의사 추천

사전 요구사항
  • HTTP Webhook 엔드포인트(n8n이 자동으로 생성)
  • 대상 API의 인증 정보가 필요할 수 있음
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "dIL4vZA7RjcU07qx",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "AI Symptom Checker & Doctor Suggestion",
  "tags": [],
  "nodes": [
    {
      "id": "73fc058d-d6ff-477d-826a-c1e050312f13",
      "name": "Medical AI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        240,
        1480
      ],
      "parameters": {
        "model": "=llama3.2-16000:latest",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "id": "7td3WzXCW2wNhraP",
          "name": "Ollama - test"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "388c6212-65d0-47a4-a28a-f7bf9dd5c789",
      "name": "Symptom Input Webhook 트리거",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -80,
        1260
      ],
      "webhookId": "2837e22a-d927-40c4-bc43-7c2ec38cfdcf",
      "parameters": {
        "path": "2837e22a-d927-40c4-bc43-7c2ec38cfdcf",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1
    },
    {
      "id": "d0f553ed-cb9f-458e-b4be-9facd5a9ce8a",
      "name": "AI Symptom Analysis",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        140,
        1260
      ],
      "parameters": {
        "text": "={{ $json.body.symptoms }}",
        "options": {
          "systemMessage": "You are a medical AI assistant that analyzes symptoms and provides preliminary assessments. IMPORTANT: Always emphasize that this is not a substitute for professional medical advice.\n\nAnalyze the symptoms and provide a JSON response with:\n{\n  \"urgency_level\": \"low/medium/high/emergency\",\n  \"possible_conditions\": [\"condition1\", \"condition2\", \"condition3\"],\n  \"specialist_needed\": \"General Practitioner/Cardiologist/Dermatologist/Neurologist/Orthopedist/Gastroenterologist/Pulmonologist/Emergency\",\n  \"severity_assessment\": \"brief description\",\n  \"recommended_actions\": [\"action1\", \"action2\"],\n  \"red_flags\": [\"warning sign if any\"]\n}\n\nSymptoms to analyze: {{ $json.body.symptoms }}\n\nPatient details:\n- Age: {{ $json.body.age || 'Not provided' }}\n- Gender: {{ $json.body.gender || 'Not provided' }}\n- Duration: {{ $json.body.duration || 'Not provided' }}\n- Additional info: {{ $json.body.additional_info || 'None' }}"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "ce5d7cce-602e-4ca1-a565-15256a13fc6a",
      "name": "Parse Medical Analysis",
      "type": "n8n-nodes-base.code",
      "position": [
        520,
        1260
      ],
      "parameters": {
        "jsCode": "// Parse the AI response and extract medical assessment\nconst aiResponse = items[0].json.output;\nconst originalData = $node[\"Symptom Input Webhook\"].json.body;\n\ntry {\n  // Try to parse JSON response from AI\n  let analysis;\n  if (aiResponse.includes('{')) {\n    const jsonStart = aiResponse.indexOf('{');\n    const jsonEnd = aiResponse.lastIndexOf('}') + 1;\n    const jsonStr = aiResponse.substring(jsonStart, jsonEnd);\n    analysis = JSON.parse(jsonStr);\n  } else {\n    // Fallback if AI doesn't return proper JSON\n    analysis = {\n      urgency_level: \"medium\",\n      possible_conditions: [\"General symptoms requiring medical evaluation\"],\n      specialist_needed: \"General Practitioner\",\n      severity_assessment: aiResponse,\n      recommended_actions: [\"Consult with a healthcare provider\"],\n      red_flags: []\n    };\n  }\n\n  return [{\n    json: {\n      ...originalData,\n      analysis: analysis,\n      timestamp: new Date().toISOString()\n    }\n  }];\n} catch (error) {\n  // Error handling - return basic assessment\n  return [{\n    json: {\n      ...originalData,\n      analysis: {\n        urgency_level: \"medium\",\n        possible_conditions: [\"Symptoms require medical evaluation\"],\n        specialist_needed: \"General Practitioner\",\n        severity_assessment: \"Unable to analyze symptoms properly. Please consult a healthcare provider.\",\n        recommended_actions: [\"Schedule appointment with doctor\", \"Monitor symptoms\"],\n        red_flags: [\"Seek immediate care if symptoms worsen\"]\n      },\n      timestamp: new Date().toISOString()\n    }\n  }];\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "15555bde-19dc-4278-b32b-e7601807cc6c",
      "name": "Check Emergency",
      "type": "n8n-nodes-base.if",
      "position": [
        740,
        1260
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.analysis.urgency_level }}",
              "value2": "emergency"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "87c59d4b-098d-4884-80d8-297a4bd99e9e",
      "name": "Find Doctors",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        1360
      ],
      "parameters": {
        "url": "https://api.betterdoctor.com/2016-03-01/doctors",
        "options": {},
        "queryParametersUi": {
          "parameter": [
            {
              "name": "specialty_uid",
              "value": "={{ $json.analysis.specialist_needed === 'Cardiologist' ? 'cardiologist' : $json.analysis.specialist_needed === 'Dermatologist' ? 'dermatologist' : $json.analysis.specialist_needed === 'Neurologist' ? 'neurologist' : $json.analysis.specialist_needed === 'Orthopedist' ? 'orthopedic-surgeon' : $json.analysis.specialist_needed === 'Gastroenterologist' ? 'gastroenterologist' : $json.analysis.specialist_needed === 'Pulmonologist' ? 'pulmonologist' : 'family-practitioner' }}"
            },
            {
              "name": "location",
              "value": "={{ $json.location || 'New York, NY' }}"
            },
            {
              "name": "limit",
              "value": "5"
            },
            {
              "name": "user_key",
              "value": "YOUR_BETTERDOCTOR_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a30ea8a7-1943-4549-9da1-a0d2372979db",
      "name": "Create Emergency Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1180,
        1160
      ],
      "parameters": {
        "jsCode": "// Create emergency response\nconst patientData = items[0].json;\nconst symptoms = patientData.symptoms;\nconst analysis = patientData.analysis;\n\nconst emergencyMessage = `🚨 *URGENT MEDICAL ATTENTION NEEDED* 🚨\\n\\n` +\n  `⚠️ Based on your symptoms, you may need immediate medical care.\\n\\n` +\n  `📋 *Your Symptoms:*\\n${symptoms}\\n\\n` +\n  `🏥 *PLEASE DO ONE OF THE FOLLOWING IMMEDIATELY:*\\n` +\n  `• Call emergency services (911/108)\\n` +\n  `• Go to nearest emergency room\\n` +\n  `• Contact your doctor immediately\\n\\n` +\n  `⚠️ *This is an automated assessment. Trust your instincts - if you feel something is seriously wrong, seek immediate medical attention.*\\n\\n` +\n  `📱 Emergency Contact: 911 (US) | 108 (India)`;\n\nreturn [{\n  json: {\n    phone_number: patientData.phone,\n    email: patientData.email,\n    message: emergencyMessage,\n    type: 'emergency',\n    patient_data: patientData\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "1dbb9438-396b-4fc5-9a4a-7d493db64c47",
      "name": "Format Medical Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1180,
        1360
      ],
      "parameters": {
        "jsCode": "// Format doctor recommendations and medical advice\nconst patientData = $node[\"Parse Medical Analysis\"].json;\nconst doctorsData = items[0].json;\nconst analysis = patientData.analysis;\n\n// Format doctors list\nlet doctorsList = '';\nif (doctorsData.data && doctorsData.data.length > 0) {\n  doctorsList = doctorsData.data.slice(0, 3).map((doctor, index) => {\n    const name = `${doctor.profile.first_name} ${doctor.profile.last_name}`;\n    const specialty = doctor.specialties[0]?.name || 'General Practice';\n    const phone = doctor.practices[0]?.phones[0]?.number || 'Not available';\n    const address = doctor.practices[0]?.visit_address ? \n      `${doctor.practices[0].visit_address.street}, ${doctor.practices[0].visit_address.city}` : \n      'Address not available';\n    \n    return `${index + 1}. *Dr. ${name}*\\n` +\n           `   🏥 ${specialty}\\n` +\n           `   📞 ${phone}\\n` +\n           `   📍 ${address}\\n`;\n  }).join('\\n');\n} else {\n  doctorsList = 'No doctors found in your area. Please search online or contact your local healthcare directory.';\n}\n\n// Create comprehensive medical response\nconst urgencyEmoji = {\n  'low': '🟢',\n  'medium': '🟡', \n  'high': '🟠',\n  'emergency': '🔴'\n};\n\nconst message = `🏥 *Medical Assessment Results*\\n\\n` +\n  `📋 *Your Symptoms:*\\n${patientData.symptoms}\\n\\n` +\n  `${urgencyEmoji[analysis.urgency_level]} *Urgency Level:* ${analysis.urgency_level.toUpperCase()}\\n\\n` +\n  `🔍 *Possible Conditions:*\\n${analysis.possible_conditions.map(condition => `• ${condition}`).join('\\n')}\\n\\n` +\n  `👨‍⚕️ *Recommended Specialist:* ${analysis.specialist_needed}\\n\\n` +\n  `💡 *Assessment:*\\n${analysis.severity_assessment}\\n\\n` +\n  `✅ *Recommended Actions:*\\n${analysis.recommended_actions.map(action => `• ${action}`).join('\\n')}\\n\\n`;\n\nlet fullMessage = message;\n\nif (analysis.red_flags && analysis.red_flags.length > 0) {\n  fullMessage += `⚠️ *Warning Signs:*\\n${analysis.red_flags.map(flag => `• ${flag}`).join('\\n')}\\n\\n`;\n}\n\nfullMessage += `👩‍⚕️ *Recommended Doctors Near You:*\\n${doctorsList}\\n\\n` +\n  `⚠️ *Important Disclaimer:*\\n` +\n  `This is an AI-generated assessment and should NOT replace professional medical advice. ` +\n  `Always consult with qualified healthcare providers for proper diagnosis and treatment.\\n\\n` +\n  `🆘 *If you experience severe symptoms or feel this is an emergency, ` +\n  `call emergency services immediately.*`;\n\nreturn [{\n  json: {\n    phone_number: patientData.phone,\n    email: patientData.email,\n    message: fullMessage,\n    type: 'medical_advice',\n    patient_data: patientData,\n    doctors: doctorsData.data || []\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "e88d7db7-1932-49dd-8899-b655fa35309a",
      "name": "Check WhatsApp Available",
      "type": "n8n-nodes-base.if",
      "position": [
        1400,
        1260
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.phone_number }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a96b2f32-8df3-4788-85d5-ced36ff2a9d0",
      "name": "Prepare WhatsApp Message",
      "type": "n8n-nodes-base.code",
      "position": [
        1620,
        1160
      ],
      "parameters": {
        "jsCode": "// Prepare WhatsApp message payload\nconst data = items[0].json;\n\nreturn [{\n  json: {\n    messaging_product: \"whatsapp\",\n    to: data.phone_number,\n    type: \"text\",\n    text: {\n      body: data.message\n    }\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "d9824a6d-3782-4653-b492-088b4fb2689a",
      "name": "Send WhatsApp Response",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1840,
        1160
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v17.0/YOUR_PHONE_NUMBER_ID/messages",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "df7d3ba7-fd59-4c61-849d-f6b378f091d1",
      "name": "Send 이메일 Response",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1840,
        1360
      ],
      "parameters": {
        "html": "={{ $json.message.replace(/\\n/g, '<br>').replace(/\\*/g, '') }}",
        "options": {
          "allowUnauthorizedCerts": true
        },
        "subject": "🏥 Your Medical Assessment & Doctor Recommendations",
        "toEmail": "={{ $json.email }}",
        "fromEmail": "medical-bot@yourdomain.com"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "38d61048-6dce-417e-ac59-8343bfea7851",
      "name": "Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2060,
        1260
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{ { \"status\": \"success\", \"message\": \"Medical assessment sent successfully\", \"urgency_level\": $json.patient_data ? $json.patient_data.analysis.urgency_level : 'unknown', \"timestamp\": new Date().toISOString() } }}"
      },
      "typeVersion": 1
    },
    {
      "id": "e8bf4043-7a7a-45bb-93e0-f821f5f1febe",
      "name": "Medical Bot Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        700
      ],
      "parameters": {
        "color": 5,
        "width": 600,
        "height": 400,
        "content": "## 🏥 AI Symptom Checker & Doctor Suggestion\n\n**Complete Medical Assistant Workflow:**\n\n🔍 **Symptom Analysis** - AI analyzes symptoms with urgency assessment\n👨‍⚕️ **Doctor Matching** - Finds relevant specialists in user's area\n📱 **Multi-Channel Delivery** - Sends via WhatsApp + Email\n🚨 **Emergency Detection** - Identifies urgent cases automatically\n📊 **Data Logging** - Tracks consultations for analytics\n\n✅ HIPAA-compliant data handling\n✅ Professional medical disclaimers\n✅ Emergency response protocols"
      },
      "typeVersion": 1
    },
    {
      "id": "13fa264a-485b-4fa1-8458-2d8f1b74c1a5",
      "name": "설정up Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        260
      ],
      "parameters": {
        "color": 7,
        "width": 680,
        "height": 560,
        "content": "## 🛠️ Setup Requirements:\n\n**APIs & Services:**\n1. **BetterDoctor API** - Doctor directory (free tier)\n2. **WhatsApp Business API** - Meta Developer account\n3. **SMTP Email** - For email notifications\n4. **Ollama** - Local AI model\n\n**Input Format (Webhook):**\n```json\n{\n  \"symptoms\": \"headache, fever, nausea\",\n  \"age\": 30,\n  \"gender\": \"male\",\n  \"duration\": \"2 days\",\n  \"phone\": \"+1234567890\",\n  \"email\": \"user@email.com\",\n  \"location\": \"New York, NY\"\n}\n```\n\n**Test URL:**\nPOST https://your-n8n-instance.com/webhook/symptom-checker-webhook"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "27ec8d81-3686-4bf6-b767-b808b5328bf6",
  "connections": {
    "87c59d4b-098d-4884-80d8-297a4bd99e9e": {
      "main": [
        [
          {
            "node": "1dbb9438-396b-4fc5-9a4a-7d493db64c47",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "15555bde-19dc-4278-b32b-e7601807cc6c": {
      "main": [
        [
          {
            "node": "a30ea8a7-1943-4549-9da1-a0d2372979db",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "87c59d4b-098d-4884-80d8-297a4bd99e9e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "73fc058d-d6ff-477d-826a-c1e050312f13": {
      "ai_languageModel": [
        [
          {
            "node": "d0f553ed-cb9f-458e-b4be-9facd5a9ce8a",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "d0f553ed-cb9f-458e-b4be-9facd5a9ce8a": {
      "main": [
        [
          {
            "node": "ce5d7cce-602e-4ca1-a565-15256a13fc6a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email Response": {
      "main": [
        [
          {
            "node": "38d61048-6dce-417e-ac59-8343bfea7851",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Symptom Input Webhook": {
      "main": [
        [
          {
            "node": "d0f553ed-cb9f-458e-b4be-9facd5a9ce8a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ce5d7cce-602e-4ca1-a565-15256a13fc6a": {
      "main": [
        [
          {
            "node": "15555bde-19dc-4278-b32b-e7601807cc6c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d9824a6d-3782-4653-b492-088b4fb2689a": {
      "main": [
        [
          {
            "node": "38d61048-6dce-417e-ac59-8343bfea7851",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1dbb9438-396b-4fc5-9a4a-7d493db64c47": {
      "main": [
        [
          {
            "node": "e88d7db7-1932-49dd-8899-b655fa35309a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e88d7db7-1932-49dd-8899-b655fa35309a": {
      "main": [
        [
          {
            "node": "a96b2f32-8df3-4788-85d5-ced36ff2a9d0",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Email Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a96b2f32-8df3-4788-85d5-ced36ff2a9d0": {
      "main": [
        [
          {
            "node": "d9824a6d-3782-4653-b492-088b4fb2689a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a30ea8a7-1943-4549-9da1-a0d2372979db": {
      "main": [
        [
          {
            "node": "e88d7db7-1932-49dd-8899-b655fa35309a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급 - 지원 챗봇, 멀티모달 AI

유료인가요?

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

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

일정 경험을 가진 사용자를 위한 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