This workflow corresponds to n8n.io template #16457 — we link there as the canonical source.
This workflow follows the Error Trigger → Gmail recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "o6FHnr2yccaCMD7L",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Patient Intake to Doctor-Approved SOAP Note Automation",
"tags": [],
"nodes": [
{
"id": "db857033-887a-4d05-a78b-ab824d827222",
"name": "Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
896,
1008
],
"parameters": {
"width": 656,
"height": 448,
"content": "## \ud83e\ude7a AI Symptom-to-SOAP Note Generator\n\n### How it works\nPatients fill out a symptom form built directly in n8n. Their input is sent to GPT-4o Mini, which generates a structured SOAP note (Subjective, Objective, Assessment, Plan). The draft is emailed to the assigned doctor using n8n's built-in Send & Wait feature \u2014 the doctor clicks Approve or Request Edit right from their inbox. On approval, the record is saved to Google Sheets and both the patient and doctor are notified via Gmail and Telegram. If the GPT step fails, a Slack alert fires immediately.\n\n### Setup steps\n1. Connect your **OpenAI** credential to the GPT node\n2. Connect your **Gmail OAuth2** credential to all Gmail nodes\n3. Connect your **Google Sheets OAuth2** credential and set your Sheet ID and tab name\n4. Connect your **Telegram Bot** credential and set the doctor's Chat ID in the Set node\n5. Connect your **Slack OAuth2** credential and select your alert channel\n6. Replace `doctor@yourclinic.com` in the Set node with the real doctor email\n7. Activate the workflow and share the form URL with patients"
},
"typeVersion": 1
},
{
"id": "b15c5d11-a0e1-4227-9ac0-c6bae52911e2",
"name": "Section: Intake & AI",
"type": "n8n-nodes-base.stickyNote",
"position": [
1616,
1552
],
"parameters": {
"color": 7,
"width": 756,
"height": 356,
"content": "## \ud83d\udccb Patient Intake & AI Drafting\nPatient submits symptoms via the n8n Form. GPT-4o Mini converts the raw input into a clinical SOAP note. The Set node packages all patient fields and generates a unique review token for this submission."
},
"typeVersion": 1
},
{
"id": "6307a34b-c4a9-4d7a-a21b-18c3180390c0",
"name": "Section: Doctor Review",
"type": "n8n-nodes-base.stickyNote",
"position": [
2400,
1456
],
"parameters": {
"color": 7,
"width": 660,
"height": 472,
"content": "## \ud83e\ude7b Doctor Review (Send & Wait)\nThe draft SOAP note is emailed to the doctor with native n8n approval buttons. The workflow pauses here until the doctor clicks Approve or Request Edit. No external webhook needed."
},
"typeVersion": 1
},
{
"id": "96d8d47d-15c1-46bc-90af-5eedb28c361c",
"name": "Section: Approval & Notifications",
"type": "n8n-nodes-base.stickyNote",
"position": [
3104,
1312
],
"parameters": {
"color": 7,
"width": 956,
"height": 504,
"content": "## \u2705 Approval Path\nOn approval, the note and patient data are appended to Google Sheets. A confirmation email goes to the patient, followed by Telegram messages to both the patient and doctor."
},
"typeVersion": 1
},
{
"id": "319fb2e6-8371-4a60-bae5-4848beaa2220",
"name": "Section: Edit Request Path",
"type": "n8n-nodes-base.stickyNote",
"position": [
3136,
1888
],
"parameters": {
"color": 7,
"width": 540,
"height": 404,
"content": "## \u270f\ufe0f Edit Request Path\nIf the doctor requests an edit, the original SOAP draft is emailed back to them with correction instructions, and a Telegram alert confirms the edit request was received."
},
"typeVersion": 1
},
{
"id": "2119c602-3f60-48f8-b643-2c3689eb3dfc",
"name": "Section: Error Handling",
"type": "n8n-nodes-base.stickyNote",
"position": [
1984,
2016
],
"parameters": {
"color": 7,
"width": 672,
"height": 620,
"content": "## \u26a0\ufe0f Error Handling\nTwo layers of error coverage: the GPT node uses `continueErrorOutput` to catch AI failures inline and fire a Slack alert. A global Error Trigger catches any other node failure across the entire workflow and alerts the same Slack channel."
},
"typeVersion": 1
},
{
"id": "3621a8cd-3900-4f57-b37e-94587cdb6081",
"name": "Credentials & Security",
"type": "n8n-nodes-base.stickyNote",
"position": [
3920,
2064
],
"parameters": {
"color": 3,
"width": 380,
"content": "## \ud83d\udd10 Credentials & Security\nUse OAuth2 for Gmail, Google Sheets, and Slack. Use API key for OpenAI and Bot Token for Telegram. Never hardcode emails or chat IDs in shared templates \u2014 use the Set node as the single config point."
},
"typeVersion": 1
},
{
"id": "995a3f21-1ee4-4dae-8066-e1f375be7230",
"name": "Patient Symptom Form",
"type": "n8n-nodes-base.formTrigger",
"position": [
1744,
1680
],
"parameters": {
"options": {},
"formTitle": "Patient Symptom Submission Form",
"formFields": {
"values": [
{
"fieldLabel": "Full Name",
"requiredField": true
},
{
"fieldType": "date",
"fieldLabel": "Date of Birth",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Email Address",
"requiredField": true
},
{
"fieldLabel": "Telegram Chat ID"
},
{
"fieldLabel": "Chief Complaint",
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "Symptom Description",
"requiredField": true
},
{
"fieldLabel": "Duration of Symptoms",
"requiredField": true
},
{
"fieldType": "number",
"fieldLabel": "Severity (1\u201310)",
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "Associated Symptoms"
},
{
"fieldType": "textarea",
"fieldLabel": "Medical History"
},
{
"fieldType": "textarea",
"fieldLabel": "Current Medications"
},
{
"fieldLabel": "Allergies"
}
]
},
"formDescription": "Please fill in your details and symptoms below. A doctor will review your case and you will be notified shortly."
},
"typeVersion": 2.2
},
{
"id": "9f65f6e2-2425-4ef2-b875-3c53de65fa14",
"name": "Generate SOAP Note Draft (GPT-4o Mini)",
"type": "@n8n/n8n-nodes-langchain.openAi",
"onError": "continueErrorOutput",
"position": [
1984,
1680
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "You are a clinical documentation assistant. Your task is to convert raw patient symptom data into a structured SOAP note following standard medical documentation format. Be thorough, professional, and clinically precise. Format the output clearly with each SOAP section labeled."
},
{
"content": "=Generate a complete SOAP note from the following patient symptom submission:\n\n**Patient Name:** {{ $json['Full Name'] }}\n**Date of Birth:** {{ $json['Date of Birth'] }}\n**Date:** {{ $now.format('MMMM D, YYYY') }}\n**Chief Complaint:** {{ $json['Chief Complaint'] }}\n**Symptom Description:** {{ $json['Symptom Description'] }}\n**Duration:** {{ $json['Duration of Symptoms'] }}\n**Severity (1-10):** {{ $json['Severity (1\u201310)'] }}\n**Associated Symptoms:** {{ $json['Associated Symptoms'] }}\n**Medical History:** {{ $json['Medical History'] }}\n**Current Medications:** {{ $json['Current Medications'] }}\n**Allergies:** {{ $json['Allergies'] }}\n\nFormat the SOAP note exactly as follows:\n\n## SOAP NOTE\n**Patient:** [Name] | **DOB:** [DOB] | **Date:** [Date]\n\n---\n\n**S \u2013 SUBJECTIVE**\n[Patient's own account of symptoms, history, and complaints in clinical language]\n\n**O \u2013 OBJECTIVE**\n[Documented observations, vitals if available, and physical exam findings based on described symptoms]\n\n**A \u2013 ASSESSMENT**\n[Clinical assessment, likely diagnosis or differential diagnoses]\n\n**P \u2013 PLAN**\n[Recommended treatment plan, follow-up, referrals, prescriptions, patient education]\n\n---\n*Draft generated by AI \u2013 Pending Physician Review*"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.4
},
{
"id": "3040be48-4691-4fa4-9a6f-fb245985e88e",
"name": "Prepare Patient & Note Data",
"type": "n8n-nodes-base.set",
"position": [
2448,
1664
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f001",
"name": "patient_name",
"type": "string",
"value": "={{ $('Patient Symptom Form').item.json['Full Name'] }}"
},
{
"id": "f002",
"name": "patient_email",
"type": "string",
"value": "={{ $('Patient Symptom Form').item.json['Email Address'] }}"
},
{
"id": "f003",
"name": "patient_telegram_id",
"type": "string",
"value": "={{ $('Patient Symptom Form').item.json['Telegram Chat ID'] }}"
},
{
"id": "f004",
"name": "date_of_birth",
"type": "string",
"value": "={{ $('Patient Symptom Form').item.json['Date of Birth'] }}"
},
{
"id": "f005",
"name": "chief_complaint",
"type": "string",
"value": "={{ $('Patient Symptom Form').item.json['Chief Complaint'] }}"
},
{
"id": "f006",
"name": "soap_note_draft",
"type": "string",
"value": "={{ $json.message.content }}"
},
{
"id": "f007",
"name": "submission_timestamp",
"type": "string",
"value": "={{ $now.toISO() }}"
},
{
"id": "f008",
"name": "assigned_doctor_email",
"type": "string",
"value": "user@example.com"
},
{
"id": "f009",
"name": "doctor_telegram_id",
"type": "string",
"value": "YOUR_DOCTOR_TELEGRAM_CHAT_ID"
},
{
"id": "f010",
"name": "review_token",
"type": "string",
"value": "={{ $now.toMillis() }}-{{ $('Patient Symptom Form').item.json['Full Name'].replace(' ', '-').toLowerCase() }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "990185b0-4607-406c-8b20-c75d1a5da93d",
"name": "Send SOAP Draft to Doctor for Approval",
"type": "n8n-nodes-base.gmail",
"position": [
2704,
1664
],
"parameters": {
"sendTo": "={{ $json.assigned_doctor_email }}",
"message": "=<html><body style=\"font-family:Arial,sans-serif;max-width:700px;margin:0 auto;padding:20px;color:#333\">\n <div style=\"background:#1a3c5e;padding:20px;border-radius:8px 8px 0 0\">\n <h1 style=\"color:white;margin:0;font-size:22px\">\ud83e\ude7a SOAP Note Pending Review</h1>\n <p style=\"color:#a8c8e8;margin:5px 0 0 0\">AI-generated draft requires your approval before filing</p>\n </div>\n <div style=\"background:#f8f9fa;padding:20px;border:1px solid #dee2e6;border-top:none\">\n <h2 style=\"color:#1a3c5e;font-size:16px\">Patient Information</h2>\n <table style=\"width:100%;border-collapse:collapse\">\n <tr><td style=\"padding:6px 0;font-weight:bold;width:150px\">Patient Name:</td><td>{{ $json.patient_name }}</td></tr>\n <tr><td style=\"padding:6px 0;font-weight:bold\">Date of Birth:</td><td>{{ $json.date_of_birth }}</td></tr>\n <tr><td style=\"padding:6px 0;font-weight:bold\">Chief Complaint:</td><td>{{ $json.chief_complaint }}</td></tr>\n <tr><td style=\"padding:6px 0;font-weight:bold\">Submitted:</td><td>{{ $json.submission_timestamp }}</td></tr>\n </table>\n </div>\n <div style=\"background:white;padding:20px;border:1px solid #dee2e6;border-top:none\">\n <h2 style=\"color:#1a3c5e;font-size:16px\">AI-Generated SOAP Note Draft</h2>\n <div style=\"background:#f0f4f8;padding:15px;border-left:4px solid #1a3c5e;border-radius:4px;white-space:pre-wrap;font-family:'Courier New',monospace;font-size:13px;line-height:1.6\">{{ $json.soap_note_draft }}</div>\n </div>\n <div style=\"background:#fff8e1;padding:20px;border:1px solid #dee2e6;border-top:none;border-radius:0 0 8px 8px\">\n <h2 style=\"color:#e65100;font-size:16px\">\u26a0\ufe0f Action Required</h2>\n <p>Use the approval buttons below (provided by n8n) to Approve or Request an Edit on this SOAP note.</p>\n <p style=\"font-size:12px;color:#888\">Token: {{ $json.review_token }} | Unique to this submission.</p>\n </div>\n</body></html>",
"options": {
"appendAttribution": false
},
"subject": "=\ud83e\ude7a [ACTION REQUIRED] SOAP Note Review \u2013 {{ $json.patient_name }} | {{ $now.format('MMM D, YYYY') }}",
"operation": "sendAndWait",
"approvalOptions": {
"values": {}
}
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "76124407-a866-418c-9740-def9a247c573",
"name": "Route: Approved or Edit Requested?",
"type": "n8n-nodes-base.if",
"position": [
2944,
1664
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cond_001",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": "approved"
}
]
}
},
"typeVersion": 2
},
{
"id": "e9127442-b2df-4f40-8d9a-8514efda6249",
"name": "Save Approved Note to Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
3200,
1504
],
"parameters": {
"columns": {
"value": {
"approved": "={{ $('Send SOAP Draft to Doctor for Approval').item.json.data.approved }}",
"patient_name": "={{ $('Prepare Patient & Note Data').item.json.patient_name }}",
"date_of_birth": "={{ $('Prepare Patient & Note Data').item.json.date_of_birth }}",
"patient_email": "={{ $('Prepare Patient & Note Data').item.json.patient_email }}",
"chief_complaint": "={{ $('Prepare Patient & Note Data').item.json.chief_complaint }}",
"soap_note_draft": "={{ $('Prepare Patient & Note Data').item.json.soap_note_draft }}",
"patient_telegram_id": "={{ $('Prepare Patient & Note Data').item.json.patient_telegram_id }}",
"submission_timestamp": "={{ $('Prepare Patient & Note Data').item.json.submission_timestamp }}",
"assigned_doctor_email": "={{ $('Prepare Patient & Note Data').item.json.assigned_doctor_email }}"
},
"schema": [
{
"id": "patient_name",
"type": "string",
"display": true,
"required": false,
"displayName": "patient_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "patient_email",
"type": "string",
"display": true,
"required": false,
"displayName": "patient_email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "patient_telegram_id",
"type": "string",
"display": true,
"required": false,
"displayName": "patient_telegram_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "date_of_birth",
"type": "string",
"display": true,
"required": false,
"displayName": "date_of_birth",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "chief_complaint",
"type": "string",
"display": true,
"required": false,
"displayName": "chief_complaint",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "soap_note_draft",
"type": "string",
"display": true,
"required": false,
"displayName": "soap_note_draft",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "submission_timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "submission_timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "assigned_doctor_email",
"type": "string",
"display": true,
"required": false,
"displayName": "assigned_doctor_email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "approved",
"type": "string",
"display": true,
"required": false,
"displayName": "approved",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 97316384,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1trNYUTTCgpF9PsAo5vipRSQXTkzWizEgKRC73vBYFfc/edit#gid=97316384",
"cachedResultName": "patient approvel db"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1trNYUTTCgpF9PsAo5vipRSQXTkzWizEgKRC73vBYFfc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1trNYUTTCgpF9PsAo5vipRSQXTkzWizEgKRC73vBYFfc/edit?usp=drivesdk",
"cachedResultName": "cfo dashboard templete"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "98e51641-f670-4c78-9ef5-f03e155d8604",
"name": "Send Confirmation Email to Patient",
"type": "n8n-nodes-base.gmail",
"position": [
3440,
1504
],
"parameters": {
"sendTo": "={{ $('Prepare Patient & Note Data').item.json.patient_email }}",
"message": "=<html><body style=\"font-family:Arial,sans-serif;max-width:600px;margin:0 auto;padding:20px;color:#333\">\n <div style=\"background:#1a3c5e;padding:25px;border-radius:8px 8px 0 0;text-align:center\">\n <h1 style=\"color:white;margin:0;font-size:24px\">Your Consultation is Confirmed \u2705</h1>\n <p style=\"color:#a8c8e8;margin:8px 0 0 0\">Your clinical note has been reviewed and filed by your doctor.</p>\n </div>\n <div style=\"background:white;padding:25px;border:1px solid #dee2e6;border-top:none\">\n <p style=\"font-size:16px\">Dear <strong>{{ $('Prepare Patient & Note Data').item.json.patient_name }}</strong>,</p>\n <p>Your symptom submission has been reviewed by your assigned physician and your clinical note has been successfully filed.</p>\n <div style=\"background:#e8f5e9;padding:15px;border-radius:6px;border-left:4px solid #2e7d32;margin:20px 0\">\n <h3 style=\"color:#2e7d32;margin:0 0 10px 0\">\ud83d\udccb Next Steps</h3>\n <ul style=\"margin:0;padding-left:20px;line-height:1.8\">\n <li>You will be contacted to schedule your follow-up appointment within <strong>1\u20132 business days</strong>.</li>\n <li>If your symptoms worsen, please visit the nearest urgent care or call our clinic directly.</li>\n <li>Bring a valid ID and insurance card to your appointment.</li>\n <li>Continue any currently prescribed medications as directed.</li>\n </ul>\n </div>\n <div style=\"background:#fff3e0;padding:15px;border-radius:6px;border-left:4px solid #e65100;margin:20px 0\">\n <h3 style=\"color:#e65100;margin:0 0 8px 0\">\u26a0\ufe0f Emergency Notice</h3>\n <p style=\"margin:0;font-size:14px\">For chest pain, difficulty breathing, or any emergency \u2014 call <strong>112</strong> or go to your nearest ER immediately.</p>\n </div>\n <p>Warm regards,<br><strong>Your Care Team</strong></p>\n </div>\n <div style=\"background:#f8f9fa;padding:15px;border:1px solid #dee2e6;border-top:none;border-radius:0 0 8px 8px;text-align:center\">\n <p style=\"margin:0;font-size:12px;color:#888\">Submission ID: {{ $('Prepare Patient & Note Data').item.json.review_token }} | {{ $now.format('MMMM D, YYYY') }}</p>\n </div>\n</body></html>",
"options": {
"appendAttribution": false
},
"subject": "=Your Consultation is Confirmed \u2013 {{ $('Prepare Patient & Note Data').item.json.patient_name }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "59585df3-54e5-4a1a-b3c1-664442cfa91b",
"name": "Telegram: Notify Patient \u2013 Note Approved",
"type": "n8n-nodes-base.telegram",
"position": [
3680,
1504
],
"parameters": {
"text": "=\ud83c\udfe5 *Clinic Update \u2013 Your SOAP Note is Filed*\n\nHi {{ $('Prepare Patient & Note Data').item.json.patient_name }},\n\nYour symptom submission has been reviewed and approved by your doctor. \u2705\n\n\ud83d\udccb *Chief Complaint:* {{ $('Prepare Patient & Note Data').item.json.chief_complaint }}\n\ud83d\udcc5 *Submitted:* {{ $('Prepare Patient & Note Data').item.json.submission_timestamp }}\n\n*Next Steps:*\n\u2022 You will be contacted within 1\u20132 business days to schedule your follow-up.\n\u2022 For emergencies, call *112* immediately.\n\n_This is an automated notification from your clinic._",
"chatId": "={{ $('Prepare Patient & Note Data').item.json.patient_telegram_id }}",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "44e928cc-9e3d-4a6b-9c54-50a953ca81ad",
"name": "Telegram: Notify Doctor \u2013 Note Filed",
"type": "n8n-nodes-base.telegram",
"position": [
3920,
1504
],
"parameters": {
"text": "=\u2705 *SOAP Note Approved & Filed*\n\n*Patient:* {{ $('Prepare Patient & Note Data').item.json.patient_name }}\n*Chief Complaint:* {{ $('Prepare Patient & Note Data').item.json.chief_complaint }}\n*Approved At:* {{ $now.format('MMM D, YYYY \u2013 HH:mm') }}\n\nThe note has been saved to Google Sheets and the patient has been notified via email and Telegram.\n\n_Ref Token: {{ $('Prepare Patient & Note Data').item.json.review_token }}_",
"chatId": "={{ $('Prepare Patient & Note Data').item.json.doctor_telegram_id }}",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "a4a6e67d-5581-4c7f-868a-9f1d8bf8e03f",
"name": "Send Edit Request Back to Doctor",
"type": "n8n-nodes-base.gmail",
"position": [
3216,
2032
],
"parameters": {
"sendTo": "={{ $('Prepare Patient & Note Data').item.json.assigned_doctor_email }}",
"message": "=<html><body style=\"font-family:Arial,sans-serif;max-width:600px;margin:0 auto;padding:20px;color:#333\">\n <div style=\"background:#1565c0;padding:20px;border-radius:8px 8px 0 0\">\n <h1 style=\"color:white;margin:0;font-size:20px\">\u270f\ufe0f Edit Requested on SOAP Note</h1>\n </div>\n <div style=\"background:white;padding:25px;border:1px solid #dee2e6;border-top:none\">\n <p>You have requested an edit on the SOAP note for <strong>{{ $('Prepare Patient & Note Data').item.json.patient_name }}</strong>.</p>\n <p>The original draft is below for your reference. Please reply to this email or contact the admin team with your corrections.</p>\n <div style=\"background:#f0f4f8;padding:15px;border-left:4px solid #1565c0;border-radius:4px;white-space:pre-wrap;font-family:'Courier New',monospace;font-size:13px;line-height:1.6\">{{ $('Prepare Patient & Note Data').item.json.soap_note_draft }}</div>\n <p style=\"margin-top:20px;font-size:12px;color:#888\">Token: {{ $('Prepare Patient & Note Data').item.json.review_token }}</p>\n </div>\n</body></html>",
"options": {
"appendAttribution": false
},
"subject": "=\ud83d\udcdd Edit Requested \u2013 SOAP Note for {{ $('Prepare Patient & Note Data').item.json.patient_name }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "8c89ba5a-7ea4-4c95-a0b5-c76f97c03dad",
"name": "Telegram: Notify Doctor \u2013 Edit Requested",
"type": "n8n-nodes-base.telegram",
"position": [
3456,
2032
],
"parameters": {
"text": "=\u270f\ufe0f *Edit Requested \u2013 SOAP Note*\n\n*Patient:* {{ $('Prepare Patient & Note Data').item.json.patient_name }}\n*Chief Complaint:* {{ $('Prepare Patient & Note Data').item.json.chief_complaint }}\n\nYou have requested an edit on this SOAP note. Please check your email for the original draft and reply with your corrections.\n\n_Ref Token: {{ $('Prepare Patient & Note Data').item.json.review_token }}_",
"chatId": "={{ $('Prepare Patient & Note Data').item.json.doctor_telegram_id }}",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "b2408443-c67b-464d-b065-e3118e48d74e",
"name": "Global Workflow Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"position": [
2096,
2416
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d6685347-0116-4057-b8a0-acf198c61cbb",
"name": "Slack: Alert Ops on Global Error",
"type": "n8n-nodes-base.slack",
"position": [
2352,
2416
],
"parameters": {
"text": "=\ud83d\udea8 *SOAP Note Workflow Error*\n\n*Workflow:* {{ $workflow.name }}\n*Failed Node:* {{ $execution.lastNodeExecuted }}\n*Time:* {{ $now.format('MMM D, YYYY \u2013 HH:mm') }}\n*Execution ID:* {{ $execution.id }}\n\nPlease check the n8n execution log and follow up with the patient manually if needed.",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C0AN1UGL0RM",
"cachedResultName": "all-n8n-automations"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.3
},
{
"id": "f6f939d9-36fc-40e1-a3bc-1e1b6ed3c68d",
"name": "Slack: Alert Ops on GPT Failure",
"type": "n8n-nodes-base.slack",
"position": [
2416,
2192
],
"parameters": {
"text": "=\u26a0\ufe0f *GPT SOAP Draft Failed*\n\n*Patient:* {{ $('Patient Symptom Form').item.json['Full Name'] ?? 'Unknown' }}\n*Time:* {{ $now.format('MMM D, YYYY \u2013 HH:mm') }}\n\nThe GPT node failed to generate a SOAP note. Check your OpenAI API key and retry this execution manually.",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C0AN1UGL0RM",
"cachedResultName": "all-n8n-automations"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.3
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "a1e48f75-016e-4271-a19d-0113a8bfddae",
"connections": {
"Patient Symptom Form": {
"main": [
[
{
"node": "Generate SOAP Note Draft (GPT-4o Mini)",
"type": "main",
"index": 0
}
]
]
},
"Prepare Patient & Note Data": {
"main": [
[
{
"node": "Send SOAP Draft to Doctor for Approval",
"type": "main",
"index": 0
}
]
]
},
"Global Workflow Error Trigger": {
"main": [
[
{
"node": "Slack: Alert Ops on Global Error",
"type": "main",
"index": 0
}
]
]
},
"Send Edit Request Back to Doctor": {
"main": [
[
{
"node": "Telegram: Notify Doctor \u2013 Edit Requested",
"type": "main",
"index": 0
}
]
]
},
"Route: Approved or Edit Requested?": {
"main": [
[
{
"node": "Save Approved Note to Google Sheets",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Edit Request Back to Doctor",
"type": "main",
"index": 0
}
]
]
},
"Send Confirmation Email to Patient": {
"main": [
[
{
"node": "Telegram: Notify Patient \u2013 Note Approved",
"type": "main",
"index": 0
}
]
]
},
"Save Approved Note to Google Sheets": {
"main": [
[
{
"node": "Send Confirmation Email to Patient",
"type": "main",
"index": 0
}
]
]
},
"Generate SOAP Note Draft (GPT-4o Mini)": {
"main": [
[
{
"node": "Prepare Patient & Note Data",
"type": "main",
"index": 0
}
],
[
{
"node": "Slack: Alert Ops on GPT Failure",
"type": "main",
"index": 0
}
]
]
},
"Send SOAP Draft to Doctor for Approval": {
"main": [
[
{
"node": "Route: Approved or Edit Requested?",
"type": "main",
"index": 0
}
]
]
},
"Telegram: Notify Patient \u2013 Note Approved": {
"main": [
[
{
"node": "Telegram: Notify Doctor \u2013 Note Filed",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2googleSheetsOAuth2ApiopenAiApislackOAuth2ApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow collects patient symptoms via an n8n Form, uses OpenAI (GPT-4o Mini) to draft a SOAP note, and sends it to a doctor for email approval in Gmail. Approved notes are saved to Google Sheets and notifications go out via Gmail and Telegram, with Slack alerts on errors.…
Source: https://n8n.io/workflows/16457/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow monitors a Google Drive folder for new prescription PDFs, extracts the text, uses OpenAI (GPT-4o-mini) to structure prescription details and draft a SOAP note, checks drugs against Googl
This workflow runs a SEEK.com.au job search via Apify on a daily schedule or on-demand form submission, deduplicates new listings, and routes results to Google Sheets, Airtable, a webhook endpoint, an
This workflow is designed for business analysts, market researchers, lead generation specialists, and sales teams who need to gather detailed business intelligence from Google Maps. It's particularly
This workflow uses Google Sheets, OpenAI, Telegram, and Slack to send post-therapy check-in messages, analyze patient replies for sentiment and risk, alert therapists to at-risk responses, and log non
This workflow is an AI-powered roto matte generation and first-pass compositing pipeline designed for VFX production. It transforms structured roto requests into multiple high-precision matte passes u