AI医療症状チェッカーとヘルスアシスタント

上級

これはSupport Chatbot, AI Chatbot分野の自動化ワークフローで、17個のノードを含みます。主にIf, Set, Code, Merge, Webhookなどのノードを使用。 GPT-4-miniに基づく医療症状チェックと健康アシスタント

前提条件
  • HTTP Webhookエンドポイント(n8nが自動生成)
  • Airtable API Key
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "templateId": "ai-health-assistant-v1",
    "templateCreatedDate": "2024-01-15T00:00:00.000Z"
  },
  "name": "AI Medical Symptom Checker & Health Assistant",
  "tags": [],
  "nodes": [
    {
      "id": "disclaimer-note",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -500
      ],
      "parameters": {
        "width": 400,
        "height": 460,
        "content": "## 🏥 AI HEALTH ASSISTANT\n\n**IMPORTANT DISCLAIMER:**\nThis tool provides general health information only and is NOT a substitute for professional medical advice, diagnosis, or treatment. Always consult qualified healthcare providers for medical concerns.\n\n### ✨ Features:\n• Symptom analysis & information\n• General health guidance\n• Medicine reminders\n• Appointment scheduling hints\n• Emergency detection\n• Multi-language support\n• Privacy-first design\n\n### 🎯 Use Cases:\n• Initial symptom research\n• Health education\n• Medication tracking\n• Wellness tips\n• Pre-appointment preparation"
      },
      "typeVersion": 1
    },
    {
      "id": "safety-protocols",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -500
      ],
      "parameters": {
        "width": 320,
        "height": 400,
        "content": "## ⚠️ SAFETY PROTOCOLS\n\n**Emergency Detection:**\n• Chest pain → Call 911\n• Breathing difficulty → Call 911\n• Stroke symptoms → Call 911\n• Severe bleeding → Call 911\n• Loss of consciousness → Call 911\n\n**Auto-Escalation:**\n• Detects emergency keywords\n• Provides emergency numbers\n• Refuses diagnosis\n• Recommends immediate care\n\n**Privacy:**\n• No data storage\n• Anonymous processing\n• HIPAA considerations\n• Encrypted transmission"
      },
      "typeVersion": 1
    },
    {
      "id": "symptom-categories",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -150,
        -500
      ],
      "parameters": {
        "width": 280,
        "height": 420,
        "content": "## 📋 SYMPTOM CATEGORIES\n\n**Supported Areas:**\n\n**General:**\n• Fever & chills\n• Fatigue\n• Pain locations\n• Weight changes\n\n**Respiratory:**\n• Cough types\n• Breathing issues\n• Congestion\n\n**Digestive:**\n• Stomach pain\n• Nausea\n• Changes in habits\n\n**Mental Health:**\n• Stress levels\n• Sleep patterns\n• Mood changes\n\n**Skin:**\n• Rashes\n• Changes\n• Irritations"
      },
      "typeVersion": 1
    },
    {
      "id": "configuration",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -50
      ],
      "parameters": {
        "width": 320,
        "height": 380,
        "content": "## 🔧 CONFIGURATION\n\n**Required Setup:**\n- [ ] OpenAI API key\n- [ ] Emergency contacts database\n- [ ] Disclaimer acceptance\n- [ ] Language settings\n\n**Optional:**\n- [ ] Medical database API\n- [ ] Translation service\n- [ ] SMS notifications\n- [ ] Healthcare provider API\n- [ ] Appointment systems\n\n**Compliance:**\n• Review local regulations\n• Add required disclaimers\n• Implement data retention\n• Audit logging"
      },
      "typeVersion": 1
    },
    {
      "id": "example-interactions",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -500
      ],
      "parameters": {
        "width": 350,
        "height": 400,
        "content": "## 💬 EXAMPLE INTERACTIONS\n\n**User:** \"I have a headache for 3 days\"\n**Bot:** Provides general info about headaches, when to see doctor, self-care tips\n\n**User:** \"Chest pain can't breathe\"\n**Bot:** EMERGENCY - Call 911 immediately\n\n**User:** \"Remind me medications\"\n**Bot:** Sets up medication schedule\n\n**User:** \"Rash on arm, itchy\"\n**Bot:** General info about rashes, suggests pharmacist/doctor visit\n\n**User:** \"Feeling anxious lately\"\n**Bot:** Mental health resources, coping strategies, professional help info"
      },
      "typeVersion": 1
    },
    {
      "id": "roadmap",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -500
      ],
      "parameters": {
        "width": 300,
        "height": 420,
        "content": "## 📊 FEATURES ROADMAP\n\n**Current:**\n✅ Symptom information\n✅ Emergency detection\n✅ General guidance\n✅ Multi-language\n\n**Planned:**\n🔄 Medicine interactions\n🔄 Appointment booking\n🔄 Health tracking\n🔄 Family profiles\n🔄 Wearable integration\n🔄 Telemedicine prep\n🔄 Insurance info\n🔄 Prescription reminders\n\n**Future:**\n🔮 AI health predictions\n🔮 Personalized wellness\n🔮 Medical record analysis"
      },
      "typeVersion": 1
    },
    {
      "id": "webhook-entry",
      "name": "Health Query Webhook",
      "type": "n8n-nodes-base.webhook",
      "notes": "Receives health-related queries with strict privacy",
      "position": [
        -600,
        100
      ],
      "webhookId": "health-assistant",
      "parameters": {
        "path": "health-assistant",
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Access-Control-Allow-Origin",
                "value": "*"
              },
              {
                "name": "X-Content-Type-Options",
                "value": "nosniff"
              }
            ]
          }
        },
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "safety-check",
      "name": "安全性チェック & 分類",
      "type": "n8n-nodes-base.code",
      "notes": "Checks for emergencies and categorizes queries",
      "position": [
        -400,
        100
      ],
      "parameters": {
        "jsCode": "// Emergency keywords that trigger immediate response\nconst emergencyKeywords = [\n    'chest pain', 'heart attack', 'stroke', 'can\\'t breathe', 'breathing difficulty',\n    'unconscious', 'severe bleeding', 'suicide', 'overdose', 'poisoning',\n    'severe pain', 'allergic reaction', 'anaphylaxis', 'seizure'\n];\n\n// Extract user input\nconst userInput = $input.first().json.body?.query || $input.first().json.query || '';\nconst language = $input.first().json.body?.language || 'en';\nconst age = $input.first().json.body?.age || 'unknown';\nconst sessionId = $input.first().json.body?.sessionId || Math.random().toString(36).substring(7);\n\n// Check for emergency\nconst lowerInput = userInput.toLowerCase();\nconst isEmergency = emergencyKeywords.some(keyword => lowerInput.includes(keyword));\n\n// Categorize query type\nlet queryType = 'general';\nif (lowerInput.includes('symptom') || lowerInput.includes('pain') || lowerInput.includes('feel')) {\n    queryType = 'symptom';\n} else if (lowerInput.includes('medication') || lowerInput.includes('medicine') || lowerInput.includes('drug')) {\n    queryType = 'medication';\n} else if (lowerInput.includes('appointment') || lowerInput.includes('doctor') || lowerInput.includes('schedule')) {\n    queryType = 'appointment';\n} else if (lowerInput.includes('wellness') || lowerInput.includes('health tip') || lowerInput.includes('prevent')) {\n    queryType = 'wellness';\n}\n\n// Privacy notice\nconst privacyNotice = \"This conversation is not stored and is for informational purposes only.\";\n\n// Prepare output\nreturn {\n    userInput,\n    language,\n    age,\n    sessionId,\n    isEmergency,\n    queryType,\n    privacyNotice,\n    timestamp: new Date().toISOString(),\n    disclaimer: \"This is not medical advice. Consult healthcare professionals for medical concerns.\"\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "emergency-router",
      "name": "緊急ルーター",
      "type": "n8n-nodes-base.if",
      "position": [
        -200,
        100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c5528e99-6c2d-469e-aec6-ad5b07d5c8f1",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.isEmergency }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "emergency-response",
      "name": "緊急対応",
      "type": "n8n-nodes-base.set",
      "notes": "Immediate emergency response with contact numbers",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "emergency",
              "name": "response",
              "type": "string",
              "value": "=🚨 EMERGENCY DETECTED 🚨\n\n**CALL EMERGENCY SERVICES IMMEDIATELY:**\n\n🇺🇸 USA: 911\n🇬🇧 UK: 999\n🇪🇺 EU: 112\n🇦🇺 Australia: 000\n\n**Your message suggests a medical emergency.**\n\nWhile waiting for help:\n1. Stay calm\n2. Don't drive yourself\n3. Unlock doors for paramedics\n4. Have medications list ready\n5. Call someone to be with you\n\n**This is an automated response. Get immediate medical help!**"
            },
            {
              "id": "type",
              "name": "responseType",
              "type": "string",
              "value": "emergency"
            },
            {
              "id": "severity",
              "name": "severity",
              "type": "string",
              "value": "critical"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "health-ai",
      "name": "健康情報AI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "notes": "Provides general health information with strict guidelines",
      "position": [
        0,
        200
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4-mini"
        },
        "options": {
          "maxTokens": 1000,
          "temperature": 0.3
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a helpful health information assistant. You provide general health information and wellness guidance while being very careful to:\n\n1. NEVER diagnose conditions\n2. NEVER prescribe medications\n3. NEVER replace professional medical advice\n4. ALWAYS recommend consulting healthcare providers for medical concerns\n5. ALWAYS emphasize this is general information only\n\nYour responses should be:\n- Informative but cautious\n- Empathetic and supportive\n- Clear about limitations\n- Focused on general wellness\n- Encouraging professional consultation\n\nFor symptom queries:\n- Provide general information about possible causes\n- Suggest when to see a doctor\n- Offer comfort measures if appropriate\n- Never minimize serious symptoms\n\nFor medication queries:\n- Only provide general information\n- Emphasize consulting pharmacists/doctors\n- Never suggest specific dosages\n- Mention common side effects only generally\n\nAlways end with a disclaimer about seeking professional medical advice."
            },
            {
              "role": "user",
              "content": "={{ $json.userInput }}\n\nContext:\n- Query Type: {{ $json.queryType }}\n- Language: {{ $json.language }}\n- Age Group: {{ $json.age }}\n\nPlease provide helpful general health information while being clear this is not medical advice."
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "{{YOUR_OPENAI_CREDENTIAL}}",
          "name": "OpenAI account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "format-health-response",
      "name": "健康応答のフォーマット",
      "type": "n8n-nodes-base.set",
      "notes": "Adds disclaimers and resources to response",
      "position": [
        200,
        200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3d0292bc-0e07-4b55-9b7f-be0b417c2e05",
              "name": "response",
              "type": "string",
              "value": "={{ $json.message.content }}"
            },
            {
              "id": "e4e66a7a-1776-465b-865f-76666c5e3584",
              "name": "responseType",
              "type": "string",
              "value": "={{ $('Safety Check & Categorization').item.json.queryType }}"
            },
            {
              "id": "b2346867-40bb-4321-a3bd-59b948036dca",
              "name": "disclaimer",
              "type": "string",
              "value": "=⚕️ **Important Medical Disclaimer:**\nThis information is for educational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition."
            },
            {
              "id": "8f30e7de-3dcb-412f-bcd8-d8bbfff087fb",
              "name": "resources",
              "type": "string",
              "value": "=📞 **Health Resources:**\n• Find a doctor: https://doctor.webmd.com/\n• Symptom checker: https://www.mayoclinic.org/symptom-checker/\n• Mental health: https://www.samhsa.gov/find-help/national-helpline\n• Poison control: 1-800-222-1222 (US)"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "merge-responses",
      "name": "マージ",
      "type": "n8n-nodes-base.merge",
      "position": [
        400,
        100
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combinationMode": "multiplex"
      },
      "typeVersion": 3
    },
    {
      "id": "compile-response",
      "name": "最終応答のコンパイル",
      "type": "n8n-nodes-base.code",
      "notes": "Creates structured response with all necessary information",
      "position": [
        600,
        100
      ],
      "parameters": {
        "jsCode": "// Compile final response\nconst input = $('Safety Check & Categorization').item.json;\nconst response = $input.first().json;\n\n// Build structured response\nconst output = {\n    success: true,\n    sessionId: input.sessionId,\n    timestamp: new Date().toISOString(),\n    query: {\n        original: input.userInput,\n        type: input.queryType,\n        isEmergency: input.isEmergency,\n        language: input.language\n    },\n    response: {\n        content: response.response,\n        type: response.responseType,\n        severity: response.severity || 'normal'\n    },\n    disclaimers: {\n        medical: response.disclaimer || input.disclaimer,\n        privacy: input.privacyNotice\n    },\n    resources: response.resources || null,\n    followUp: {\n        suggestedActions: getSuggestedActions(input.queryType, input.isEmergency),\n        nextSteps: getNextSteps(input.queryType)\n    }\n};\n\n// Helper functions\nfunction getSuggestedActions(queryType, isEmergency) {\n    if (isEmergency) return ['Call emergency services', 'Get immediate help'];\n    \n    const actions = {\n        symptom: ['Track symptoms', 'Schedule doctor visit', 'Rest and monitor'],\n        medication: ['Consult pharmacist', 'Read medication guide', 'Set reminders'],\n        appointment: ['Call your provider', 'Prepare questions', 'Gather medical history'],\n        wellness: ['Start healthy habits', 'Track progress', 'Set wellness goals'],\n        general: ['Consult healthcare provider', 'Learn more', 'Stay informed']\n    };\n    \n    return actions[queryType] || actions.general;\n}\n\nfunction getNextSteps(queryType) {\n    const steps = {\n        symptom: 'If symptoms persist or worsen, see a healthcare provider promptly.',\n        medication: 'Always follow prescription instructions and consult your pharmacist.',\n        appointment: 'Write down your concerns to discuss with your provider.',\n        wellness: 'Small daily changes can lead to significant health improvements.',\n        general: 'Your health is important - don\\'t hesitate to seek professional help.'\n    };\n    \n    return steps[queryType] || steps.general;\n}\n\nreturn output;"
      },
      "typeVersion": 2
    },
    {
      "id": "send-response",
      "name": "応答送信",
      "type": "n8n-nodes-base.respondToWebhook",
      "notes": "Returns health information with appropriate headers",
      "position": [
        800,
        100
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/json"
              },
              {
                "name": "X-Health-Disclaimer",
                "value": "This is not medical advice"
              }
            ]
          }
        },
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json, null, 2) }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "integration-options",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -50
      ],
      "parameters": {
        "width": 300,
        "height": 400,
        "content": "## 📱 INTEGRATION OPTIONS\n\n**Channels:**\n• Web chat widget\n• WhatsApp Business\n• Telegram bot\n• SMS gateway\n• Voice assistants\n• Mobile apps\n\n**Healthcare Systems:**\n• EHR integration\n• Appointment APIs\n• Pharmacy systems\n• Insurance verification\n• Telemedicine platforms\n\n**Data Sources:**\n• Medical databases\n• Drug interaction APIs\n• Symptom databases\n• Provider directories"
      },
      "typeVersion": 1
    },
    {
      "id": "audit-log",
      "name": "監査ログ (オプション)",
      "type": "n8n-nodes-base.airtable",
      "notes": "Optional: Log queries for compliance (configure data retention)",
      "disabled": true,
      "position": [
        400,
        300
      ],
      "parameters": {
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "session_id",
              "fieldValue": "={{ $('Safety Check & Categorization').item.json.sessionId }}"
            },
            {
              "fieldId": "query_type",
              "fieldValue": "={{ $('Safety Check & Categorization').item.json.queryType }}"
            },
            {
              "fieldId": "is_emergency",
              "fieldValue": "={{ $('Safety Check & Categorization').item.json.isEmergency }}"
            },
            {
              "fieldId": "timestamp",
              "fieldValue": "={{ $('Safety Check & Categorization').item.json.timestamp }}"
            }
          ]
        },
        "resource": "database",
        "operation": "create",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "health-assistant-logs"
        }
      },
      "typeVersion": 2
    }
  ],
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "connections": {
    "merge-responses": {
      "main": [
        [
          {
            "node": "compile-response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "emergency-router": {
      "main": [
        [
          {
            "node": "emergency-response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "health-ai",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "emergency-response": {
      "main": [
        [
          {
            "node": "merge-responses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "webhook-entry": {
      "main": [
        [
          {
            "node": "safety-check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "health-ai": {
      "main": [
        [
          {
            "node": "format-health-response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "compile-response": {
      "main": [
        [
          {
            "node": "send-response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "format-health-response": {
      "main": [
        [
          {
            "node": "merge-responses",
            "type": "main",
            "index": 1
          },
          {
            "node": "audit-log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "safety-check": {
      "main": [
        [
          {
            "node": "emergency-router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - サポートチャットボット, AIチャットボット

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

航空公司のFAQボット
GPT-4と質問分類を使った航空会社カスタマーサポートの自動化
If
Code
Merge
+
If
Code
Merge
27 ノードOneclick AI Squad
サポートチャットボット
マルチチャンネルDHLステータスボット
Webフォームおよびメール照会に対応する自動化DHLパッケージ追跡ボット
If
Code
Gmail
+
If
Code
Gmail
15 ノードYusuke Yamamoto
サポートチャットボット
AI駆動型Facebookページサポートチャットボット:自動返信とインテリジェントな顧客対応
GPT-4.1を使ったFacebook Messengerチャットボット:ヒューマンゲージ対応
If
Set
Wait
+
If
Set
Wait
32 ノードSpaGreen Creative
サポートチャットボット
AIソーシャルメディアコンテンツ生成ツール&スケジューラー
GPT-4 と自動スケジューラを使用してクロスプラットフォームのソーシャル メディア コンテンツを生成する
Set
Code
Webhook
+
Set
Code
Webhook
14 ノードJah coozi
コンテンツ作成
WhatsApp AI アシスタントとGoogleドキュメント、Gemini を使って顧客サポートを自動化
WhatsApp AIアシスタントとGoogleドキュメント、Geminiを使って顧客サポートを自動化
If
Code
Webhook
+
If
Code
Webhook
14 ノードJamot
サポートチャットボット
自動化プロスペクト生成とパーソナライズされたアウトリーチ:Apollo、AI、Instantly.ai
自動化avic リード生成とパーソナライズドウォームアップ:Apollo、AI、アンドインスタンティエイトpty
If
Set
Code
+
If
Set
Code
166 ノードRuben AI
リードナーチャリング
ワークフロー情報
難易度
上級
ノード数17
カテゴリー2
ノードタイプ9
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34