Last active
August 31, 2026 13:25
-
-
Save iamvaar-dev/200655ba87a29ac4a41329bc4d1f1921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nodes": [ | |
| { | |
| "parameters": { | |
| "fieldToSplitOut": "data", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.splitOut", | |
| "typeVersion": 1, | |
| "position": [ | |
| 448, | |
| -48 | |
| ], | |
| "id": "901653ad-a753-4f66-8cbf-586eeda14a39", | |
| "name": "Split Out" | |
| }, | |
| { | |
| "parameters": { | |
| "assignments": { | |
| "assignments": [ | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000001", | |
| "name": "patientEmail", | |
| "type": "string", | |
| "value": "={{ $json.attendees[0].email }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000002", | |
| "name": "patientName", | |
| "type": "string", | |
| "value": "={{ $json.attendees[0].name }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000003", | |
| "name": "patientPhone", | |
| "type": "string", | |
| "value": "={{ $json.attendees[0].phoneNumber || $json.attendees[0].phone }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000004", | |
| "name": "bookingUid", | |
| "type": "string", | |
| "value": "={{ $json.uid }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000005", | |
| "name": "eventTypeId", | |
| "type": "string", | |
| "value": "={{ $json.eventTypeId }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000006", | |
| "name": "eventTypeSlug", | |
| "type": "string", | |
| "value": "={{ $json.eventType?.slug }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000007", | |
| "name": "slotDate", | |
| "type": "string", | |
| "value": "={{ $json.start.split('T')[0] }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000008", | |
| "name": "slotTime", | |
| "type": "string", | |
| "value": "={{ $json.start.split('T')[1].substring(0,5) }}" | |
| }, | |
| { | |
| "id": "a1111111-0000-4000-8000-000000000009", | |
| "name": "slotStartISO", | |
| "type": "string", | |
| "value": "={{ $json.start }}" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.set", | |
| "typeVersion": 3.4, | |
| "position": [ | |
| 896, | |
| -144 | |
| ], | |
| "id": "84948623-3998-4f4f-9865-bc91fe136edf", | |
| "name": "Extract No-Show Details" | |
| }, | |
| { | |
| "parameters": {}, | |
| "type": "n8n-nodes-base.noOp", | |
| "typeVersion": 1, | |
| "position": [ | |
| 896, | |
| 48 | |
| ], | |
| "id": "1b84fb84-c752-4d19-8e79-ad4b7c2801e7", | |
| "name": "No Action – Patient Attended" | |
| }, | |
| { | |
| "parameters": { | |
| "content": "## Setup needed\n1. **Tag No-Show in CRM**: swap the generic HTTP Request for your real CRM (HubSpot/Salesforce/GHL native node), or set header auth credentials here.\n2. **Query Waitlist for Slot** & **Mark Waitlist Notified**: point the Postgres credential at your waitlist table (id, patient_name, phone_number, event_type_id, preferred_date, notified, created_at).\n3. **Send Last-Minute Opening SMS**: add your Twilio credential + purchased sending number.\n\nBoth branches (CRM tag + waitlist SMS) fire in parallel off the same 'Extract No-Show Details' node, so nothing waits on the other.", | |
| "height": 260, | |
| "width": 380 | |
| }, | |
| "type": "n8n-nodes-base.stickyNote", | |
| "typeVersion": 1, | |
| "position": [ | |
| -832, | |
| 1216 | |
| ], | |
| "id": "ad2073ac-c9ed-4d9f-be0a-9cb52ea84201", | |
| "name": "Sticky Note" | |
| }, | |
| { | |
| "parameters": { | |
| "operation": "getAll", | |
| "filters": { | |
| "query": "={{ $json.patientEmail }}" | |
| }, | |
| "options": {}, | |
| "requestOptions": {} | |
| }, | |
| "type": "n8n-nodes-base.highLevel", | |
| "typeVersion": 2, | |
| "position": [ | |
| 1120, | |
| -144 | |
| ], | |
| "id": "c988bbca-b7fa-4a21-a0bb-6bfe7d0aec08", | |
| "name": "Get many contacts", | |
| "credentials": { | |
| "highLevelOAuth2Api": { | |
| "id": "j07jOQoIY1vL4lAY", | |
| "name": "HighLevel account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "strict", | |
| "version": 3 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "dc20cabc-50fe-4808-a598-718c7df5ffbc", | |
| "leftValue": "={{ $json.id }}", | |
| "rightValue": "", | |
| "operator": { | |
| "type": "string", | |
| "operation": "notEmpty", | |
| "singleValue": true | |
| } | |
| } | |
| ], | |
| "combinator": "and" | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2.3, | |
| "position": [ | |
| 1344, | |
| -144 | |
| ], | |
| "id": "a3b9bbed-4a2b-41c1-914a-426f8ef2630a", | |
| "name": "If1" | |
| }, | |
| { | |
| "parameters": { | |
| "email": "={{ $json.email }}", | |
| "phone": "={{ $json.phone }}", | |
| "additionalFields": { | |
| "customFields": { | |
| "values": [ | |
| { | |
| "fieldId": { | |
| "__rl": true, | |
| "value": "UjeaqUSf0laswRAB3Rm9", | |
| "mode": "list", | |
| "cachedResultName": "no_show" | |
| }, | |
| "fieldValue": "true" | |
| }, | |
| { | |
| "fieldId": { | |
| "__rl": true, | |
| "value": "d2CEjd3jBke72xo524on", | |
| "mode": "list", | |
| "cachedResultName": "no_show_count" | |
| }, | |
| "fieldValue": "={{ Number($json.customFields[1].value) + 1 }}" | |
| } | |
| ] | |
| } | |
| }, | |
| "requestOptions": {} | |
| }, | |
| "type": "n8n-nodes-base.highLevel", | |
| "typeVersion": 2, | |
| "position": [ | |
| 1584, | |
| -160 | |
| ], | |
| "id": "06bd0315-1989-48dc-88cf-7453a7d0df8b", | |
| "name": "Update no_show status to CRM contact", | |
| "credentials": { | |
| "highLevelOAuth2Api": { | |
| "id": "j07jOQoIY1vL4lAY", | |
| "name": "HighLevel account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "url": "https://api.cal.com/v2/bookings", | |
| "authentication": "predefinedCredentialType", | |
| "nodeCredentialType": "calApi", | |
| "sendQuery": true, | |
| "queryParameters": { | |
| "parameters": [ | |
| { | |
| "name": "status", | |
| "value": "past" | |
| }, | |
| { | |
| "name": "limit", | |
| "value": "100" | |
| } | |
| ] | |
| }, | |
| "sendHeaders": true, | |
| "headerParameters": { | |
| "parameters": [ | |
| { | |
| "name": "cal-api-version", | |
| "value": "2024-08-13" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.httpRequest", | |
| "typeVersion": 4.5, | |
| "position": [ | |
| 224, | |
| -48 | |
| ], | |
| "id": "2538da45-ffc9-499c-9ce5-28c1868c080c", | |
| "name": "Get Past appointments", | |
| "credentials": { | |
| "calApi": { | |
| "id": "5ZrWvGtUVbtqg40Z", | |
| "name": "Cal account [email protected]" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "loose", | |
| "version": 3 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "0b5a69f8-7880-4d8d-85a8-202936b271e1", | |
| "leftValue": "={{ $json.attendees.some(a => a.absent === true) }}", | |
| "rightValue": "true", | |
| "operator": { | |
| "type": "string", | |
| "operation": "equals" | |
| } | |
| } | |
| ], | |
| "combinator": "and" | |
| }, | |
| "looseTypeValidation": true, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2.3, | |
| "position": [ | |
| 672, | |
| -48 | |
| ], | |
| "id": "b4864f3f-2a43-4198-985c-f3c2c601aa59", | |
| "name": "Pass only no show appointments" | |
| }, | |
| { | |
| "parameters": { | |
| "assignments": { | |
| "assignments": [ | |
| { | |
| "id": "b3803516-a8c3-4b1b-86e5-269ff64e1f86", | |
| "name": "start", | |
| "value": "={{ $('Pass only no show appointments').item.json.start }}", | |
| "type": "string" | |
| }, | |
| { | |
| "id": "d2585942-6801-4976-848e-82744e6c9bcb", | |
| "name": "end", | |
| "value": "={{ $('Pass only no show appointments').item.json.end }}", | |
| "type": "string" | |
| }, | |
| { | |
| "id": "3286cda4-2bf1-450a-a399-b366672b0361", | |
| "name": "difference_time_in_hrs", | |
| "value": "={{ Math.round(DateTime.fromISO($('Pass only no show appointments').item.json.start).diff($now, 'hours').hours) }}", | |
| "type": "string" | |
| }, | |
| { | |
| "id": "b3a136d1-64c4-4f47-b8e2-6a09b82a000b", | |
| "name": "No_show_times", | |
| "value": "={{ $json.customFields[1].value }}", | |
| "type": "number" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.set", | |
| "typeVersion": 3.5, | |
| "position": [ | |
| 1808, | |
| -160 | |
| ], | |
| "id": "32dd84ac-1998-4a3a-94d7-71c9dac1092f", | |
| "name": "Edit Fields" | |
| }, | |
| { | |
| "parameters": { | |
| "conditions": { | |
| "options": { | |
| "caseSensitive": true, | |
| "leftValue": "", | |
| "typeValidation": "strict", | |
| "version": 3 | |
| }, | |
| "conditions": [ | |
| { | |
| "id": "48277d01-4fd6-4a0e-947a-6336d597966a", | |
| "leftValue": "={{ $json.No_show_times }}", | |
| "rightValue": 3, | |
| "operator": { | |
| "type": "number", | |
| "operation": "lt" | |
| } | |
| } | |
| ], | |
| "combinator": "and" | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.if", | |
| "typeVersion": 2.3, | |
| "position": [ | |
| 2032, | |
| -160 | |
| ], | |
| "id": "487f6efd-0577-4c25-a4bb-c43a94a3831c", | |
| "name": "If" | |
| }, | |
| { | |
| "parameters": { | |
| "operation": "send", | |
| "phoneNumberId": "1083481144853090", | |
| "recipientPhoneNumber": "={{ $('Update no_show status to CRM contact').item.json.phone }}", | |
| "textBody": "=We missed you at the recent appointment.\n\nYou can use this reschedule using this link: https://cal.com/reschedule/{{ $('Extract No-Show Details').item.json.bookingUid }}", | |
| "additionalFields": {} | |
| }, | |
| "type": "n8n-nodes-base.whatsApp", | |
| "typeVersion": 1.1, | |
| "position": [ | |
| 2288, | |
| -176 | |
| ], | |
| "id": "9934e75a-94ed-475b-a7e7-3568870ca263", | |
| "name": "Send message", | |
| "webhookId": "4792432a-5b0d-4fef-aade-c39124924ba5", | |
| "credentials": { | |
| "whatsAppApi": { | |
| "id": "KsIEVWr4quKHUlO7", | |
| "name": "WhatsApp account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "rule": { | |
| "interval": [ | |
| { | |
| "triggerAtHour": 11 | |
| } | |
| ] | |
| } | |
| }, | |
| "type": "n8n-nodes-base.scheduleTrigger", | |
| "typeVersion": 1.4, | |
| "position": [ | |
| -16, | |
| -48 | |
| ], | |
| "id": "2fe23262-10c6-4d20-b5a7-e9388f163819", | |
| "name": "Schedule Trigger" | |
| } | |
| ], | |
| "connections": { | |
| "Split Out": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Pass only no show appointments", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Extract No-Show Details": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Get many contacts", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Get many contacts": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "If1", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "If1": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Update no_show status to CRM contact", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Update no_show status to CRM contact": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Edit Fields", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Get Past appointments": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Split Out", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Pass only no show appointments": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Extract No-Show Details", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [ | |
| { | |
| "node": "No Action – Patient Attended", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Edit Fields": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "If", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "If": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Send message", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Schedule Trigger": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Get Past appointments", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| } | |
| }, | |
| "pinData": {}, | |
| "meta": { | |
| "templateCredsSetupCompleted": true, | |
| "instanceId": "93f396852104089b8670e7494b0f3668b420464668ae4a8c1d6b4b5799f8e3ef" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment