Telegram で医師を予約する
上級
これはSupport Chatbot, AI Chatbot分野の自動化ワークフローで、18個のノードを含みます。主にSet, Switch, Telegram, Agent, TelegramTriggerなどのノードを使用。 Telegram、Gemini AI、Google Sheetsを基にした医師予約スケジュールシステム
前提条件
- •Telegram Bot Token
- •Google Sheets API認証情報
- •Google Gemini API Key
使用ノード (18)
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "i7D9d1oH1Z0XpoX1",
"meta": {
"instanceId": "e0f9933c2de40fd346dddfe612cf584d10411f4630c7e4f4f3436a3c24dfa368"
},
"name": "Doctor Appointment Through Telegram",
"tags": [],
"nodes": [
{
"id": "95361048-f726-451b-b12f-9b9f348e602e",
"name": "AIエージェント",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
224,
272
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemMessage": "=You are an AI assistant for a hospital. Your main task is to help users with information about doctors listed in the \"doctor_info\" Google Sheet. Whenever someone asks for a specific doctor or department, check the sheet for availability:\n\nIf the doctor or department is present, provide accurate details from the sheet.\n\nIf the doctor or department is not in the sheet, respond warmly: “Sorry, we currently do not have that doctor or department available. \"We have the below list of the Doctors available\" and show the list of doctors.\n\nAlways be polite, clear, and informative. Do not make up information or mention doctors or departments not listed in the sheet.\n\nIf user request for an appointment of any doctor, then check the appointment tools attached and respond accordingly.\n\n\n\nIf the doctor available at user requested date & time, then ask user for the patient full name to book teh appointment\n\n\nOn confirmation provide the below format.\n\nThanks <patient name> you appointment is successfully booked.\nDoctor Name: user requested doctor name\nPatient Name: Patient Name\ndate: user requested date\ntime: user requested time\nFees: check this from the dcotor info tool\n\n\nOnce confirmed go ahead and append a row in the repective doctor sheet useing sheets append tool\n\nDoctor Name: user requested doctor name\nPatient Name: Patient Name\ndate: user requested date\ntime: user requested time\n\n\n"
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "0f92dcc7-764d-4d4d-a90f-4dcb25c36012",
"name": "Telegram トリガー",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1408,
176
],
"webhookId": "4be713d2-4997-45bc-93a3-bee624416919",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "OWtSIMW5xXs1BUXK",
"name": "Test_Analayst_Helper_Bot"
}
},
"typeVersion": 1.2
},
{
"id": "3bfa46b2-626c-42ec-9c0f-9ccacfa45d2b",
"name": "Google Gemini チャットモデル",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-96,
496
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "AaiLYcmkHuNwDORB",
"name": "Google Gemini(PaLM) Api account 4"
}
},
"typeVersion": 1
},
{
"id": "84a75a48-851b-407e-8fcb-0ad8dc30efc3",
"name": "シンプルメモリ",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
32,
496
],
"parameters": {
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "3a6795cd-fce8-412e-8787-bd9fbfc1de5b",
"name": "医師情報",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
160,
496
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 454060261,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit#gid=454060261",
"cachedResultName": "Doctor_Info"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit?usp=drivesdk",
"cachedResultName": "Doctor_Appointment_DB"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "xw7WRgAozbgAiIjH",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.7
},
{
"id": "46f14fb3-0661-45c6-a64d-122b59002e11",
"name": "テキストメッセージ送信",
"type": "n8n-nodes-base.telegram",
"position": [
768,
272
],
"webhookId": "a4a5f1d9-82e5-43ab-9ffb-fc60d6a68bd1",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "OWtSIMW5xXs1BUXK",
"name": "Test_Analayst_Helper_Bot"
}
},
"typeVersion": 1.2
},
{
"id": "5fc56592-6535-439c-9bce-e361903968c6",
"name": "チャットアクション送信",
"type": "n8n-nodes-base.telegram",
"position": [
-1184,
80
],
"webhookId": "5b72f83d-67f9-4cd9-b059-e2295c75a584",
"parameters": {
"chatId": "={{ $json.message.chat.id }}",
"operation": "sendChatAction"
},
"credentials": {
"telegramApi": {
"id": "OWtSIMW5xXs1BUXK",
"name": "Test_Analayst_Helper_Bot"
}
},
"typeVersion": 1.2
},
{
"id": "789b4a10-e081-47c5-9673-1066b8a1d4d7",
"name": "Dr Karan Singh",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
288,
496
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1924485712,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit#gid=1924485712",
"cachedResultName": "Dr. Karan Singh"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit?usp=drivesdk",
"cachedResultName": "Doctor_Appointment_DB"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "xw7WRgAozbgAiIjH",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.7
},
{
"id": "29453ca6-3b20-4968-a0ca-e563b0211e6c",
"name": "Dr Arjun Mehta",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
416,
496
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1628340282,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit#gid=1628340282",
"cachedResultName": "Dr. Arjun Mehta"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit?usp=drivesdk",
"cachedResultName": "Doctor_Appointment_DB"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "xw7WRgAozbgAiIjH",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.7
},
{
"id": "c39498fb-2c1d-4774-9b07-e74f85497bb1",
"name": "Dr Karan Singh 行追加",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
544,
496
],
"parameters": {
"columns": {
"value": {
"Booked Date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Booked_Date', ``, 'string') }}",
"Booked Time": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Booked_Time', ``, 'string') }}",
"Doctor Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Doctor_Name', ``, 'string') }}",
"Patient Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Patient_Name', ``, 'string') }}"
},
"schema": [
{
"id": "Doctor Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Doctor Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Patient Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Patient Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Booked Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Booked Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Booked Time",
"type": "string",
"display": true,
"required": false,
"displayName": "Booked Time",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1924485712,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit#gid=1924485712",
"cachedResultName": "Dr. Karan Singh"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit?usp=drivesdk",
"cachedResultName": "Doctor_Appointment_DB"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "xw7WRgAozbgAiIjH",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.7
},
{
"id": "fce29d17-2d5b-4245-b2a1-2cf032d77547",
"name": "Dr Arjun Mehta 行追加",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
672,
496
],
"parameters": {
"columns": {
"value": {
"Booked Date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Booked_Date', ``, 'string') }}",
"Booked Time": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Booked_Time', ``, 'string') }}",
"Doctor Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Doctor_Name', ``, 'string') }}",
"Patient Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Patient_Name', ``, 'string') }}"
},
"schema": [
{
"id": "Doctor Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Doctor Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Patient Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Patient Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Booked Date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Booked Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Booked Time",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Booked Time",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1628340282,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit#gid=1628340282",
"cachedResultName": "Dr. Arjun Mehta"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16z9zoORxtT1PzydJSKsF5Szlu9x7QewX-5UBITjn_Kg/edit?usp=drivesdk",
"cachedResultName": "Doctor_Appointment_DB"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "xw7WRgAozbgAiIjH",
"name": "Google Sheets account 6"
}
},
"typeVersion": 4.7
},
{
"id": "e66b89a6-48e7-42d6-aeef-eb0699a7bcdb",
"name": "スイッチ",
"type": "n8n-nodes-base.switch",
"position": [
-1184,
272
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "997787ae-b98c-4d66-a2a1-8e24fe166c65",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Voice",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "487f9907-20cd-40ac-a9fb-6c19b8b48070",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.3
},
{
"id": "1b83996a-0f2a-47ea-a32e-1601f7d2d77c",
"name": "ファイル取得",
"type": "n8n-nodes-base.telegram",
"position": [
-752,
352
],
"webhookId": "46ddb783-a7f9-4eb5-ab4d-a7bbd9fed982",
"parameters": {
"fileId": "={{ $json.message.voice.file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "OWtSIMW5xXs1BUXK",
"name": "Test_Analayst_Helper_Bot"
}
},
"typeVersion": 1.2
},
{
"id": "5cb7d74b-9b60-43c2-be49-21ebb170202a",
"name": "録音文字起こし",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
-528,
352
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "audio",
"simplify": false,
"inputType": "binary"
},
"credentials": {
"googlePalmApi": {
"id": "AaiLYcmkHuNwDORB",
"name": "Google Gemini(PaLM) Api account 4"
}
},
"typeVersion": 1
},
{
"id": "74b6a3e1-bf3d-4f05-86f1-bf6d40091979",
"name": "フィールド編集",
"type": "n8n-nodes-base.set",
"position": [
-320,
352
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bec50085-d45a-4f60-b2e2-f982b662d7e8",
"name": "text",
"type": "string",
"value": "={{ $json.candidates[0].content.parts[0].text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "a5598c37-a0f2-458d-bc2c-3f522075f772",
"name": "フィールド編集1",
"type": "n8n-nodes-base.set",
"position": [
-768,
160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "19f8bd4f-da1a-4ad8-8c96-8df186911605",
"name": "text",
"type": "string",
"value": "={{ $json.message.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d5550830-dbc8-4ac9-9833-7a2cbb91f41f",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1520,
-288
],
"parameters": {
"width": 704,
"height": 336,
"content": "## Doctor’s Appointment Scheduler Agent\nThis intelligent assistant helps patients conveniently schedule doctor appointments through text or voice interaction.\n\n The agent retrieves doctor information stored in Google Sheets.\n\n It checks the doctor’s availability using the doctor’s schedule ledger tool.\n\n If the doctor is already booked for a specific date and time, the agent notifies the user and suggests alternative slots.\n\n If the doctor is available, the agent confirms the appointment details with the user and books the slot for the selected date and time."
},
"typeVersion": 1
},
{
"id": "5e18ff2b-e021-40e8-9888-325d6c925947",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-608,
-272
],
"parameters": {
"width": 752,
"height": 304,
"content": "## Doctor_Info Tool Schema\n\nDoctor name ,Department, \tFees\n\n## Doctor Schduler Schema\n\nDoctor Name, \tPatient Name, \tBooked Date, \tBooked Time"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d1109052-5ace-4801-a76a-029f82ae1b37",
"connections": {
"e66b89a6-48e7-42d6-aeef-eb0699a7bcdb": {
"main": [
[
{
"node": "a5598c37-a0f2-458d-bc2c-3f522075f772",
"type": "main",
"index": 0
}
],
[
{
"node": "1b83996a-0f2a-47ea-a32e-1601f7d2d77c",
"type": "main",
"index": 0
}
]
]
},
"95361048-f726-451b-b12f-9b9f348e602e": {
"main": [
[
{
"node": "46f14fb3-0661-45c6-a64d-122b59002e11",
"type": "main",
"index": 0
}
]
]
},
"1b83996a-0f2a-47ea-a32e-1601f7d2d77c": {
"main": [
[
{
"node": "5cb7d74b-9b60-43c2-be49-21ebb170202a",
"type": "main",
"index": 0
}
]
]
},
"3a6795cd-fce8-412e-8787-bd9fbfc1de5b": {
"ai_tool": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "ai_tool",
"index": 0
}
]
]
},
"74b6a3e1-bf3d-4f05-86f1-bf6d40091979": {
"main": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "main",
"index": 0
}
]
]
},
"a5598c37-a0f2-458d-bc2c-3f522075f772": {
"main": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "main",
"index": 0
}
]
]
},
"84a75a48-851b-407e-8fcb-0ad8dc30efc3": {
"ai_memory": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "ai_memory",
"index": 0
}
]
]
},
"29453ca6-3b20-4968-a0ca-e563b0211e6c": {
"ai_tool": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "ai_tool",
"index": 0
}
]
]
},
"789b4a10-e081-47c5-9673-1066b8a1d4d7": {
"ai_tool": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "ai_tool",
"index": 0
}
]
]
},
"0f92dcc7-764d-4d4d-a90f-4dcb25c36012": {
"main": [
[
{
"node": "e66b89a6-48e7-42d6-aeef-eb0699a7bcdb",
"type": "main",
"index": 0
},
{
"node": "5fc56592-6535-439c-9bce-e361903968c6",
"type": "main",
"index": 0
}
]
]
},
"5cb7d74b-9b60-43c2-be49-21ebb170202a": {
"main": [
[
{
"node": "74b6a3e1-bf3d-4f05-86f1-bf6d40091979",
"type": "main",
"index": 0
}
]
]
},
"3bfa46b2-626c-42ec-9c0f-9ccacfa45d2b": {
"ai_languageModel": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"fce29d17-2d5b-4245-b2a1-2cf032d77547": {
"ai_tool": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "ai_tool",
"index": 0
}
]
]
},
"c39498fb-2c1d-4774-9b07-e74f85497bb1": {
"ai_tool": [
[
{
"node": "95361048-f726-451b-b12f-9b9f348e602e",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - サポートチャットボット, AIチャットボット
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
WhatsApp / Telegram WooCommerce注文サポート
Telegram と Gmail を使用したGemini と GPT を使用した WooCommerce カスタマーサポートの自動化
Set
Gmail
Merge
+
Set
Gmail
Merge
25 ノードAppStoneLab Technologies LLP
サポートチャットボット
ペットビューティー公開と予約の自動化
AI、Facebook、Telegram ボットを使ったペットコーディネーションの掲載と予約の自動化
If
Set
Switch
+
If
Set
Switch
36 ノードChristian Moises
AIチャットボット
マイワークフロー2
複数のGPT-4o AIエージェントで個人データを管理する:Telegram上のGmail、タスク、財務
Set
Code
Gmail
+
Set
Code
Gmail
62 ノードMahmoud Shrouf
AIチャットボット
Telegramサポート取り扱いの自動化
GPT-4とメール通知を使用して、TelegramサポートからAIから人間への段階の移行を自動化
If
Set
Switch
+
If
Set
Switch
40 ノードMeelioo
サポートチャットボット
J.A.R.V.I.S.
Telegram上でOpenAI、SERP、ベクターストアを使った包括のなマルチモーダルアシスタントの構築
If
Set
Code
+
If
Set
Code
48 ノードFabioInTech
サポートチャットボット
CRM の連絡先を取得するための Telegram ボット
TelegramとGemini AIを使ってCRM連絡先をキャプチャーし保存
If
Set
Code
+
If
Set
Code
27 ノードVadim