{ "name": "(Ricardo_29.11.) Calendly to KT simple - TEMPLATE_for-go-live", "nodes": [ { "parameters": { "events": [ "invitee.created", "invitee.canceled" ] }, "id": "b4709279-ce15-4237-8932-953da6dbb074", "name": "Calendly Trigger", "type": "n8n-nodes-base.calendlyTrigger", "typeVersion": 1, "position": [ 1020, 160 ], "webhookId": "da23cddd-9c95-407d-ab5b-248f5a08593e", "credentials": { "calendlyApi": { "id": "u0BcSW46BKto5c5B", "name": "Ric - Calendly account" } } }, { "parameters": { "assignments": { "assignments": [ { "id": "d81347b2-0c59-41b6-95f7-f36f0cd03737", "name": "invitee_start_time_seconds", "value": "={{ \n new Date(new Date($json.payload.scheduled_event.start_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getHours() * 3600 \n + new Date(new Date($json.payload.scheduled_event.start_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getMinutes() * 60 \n + new Date(new Date($json.payload.scheduled_event.start_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getSeconds() \n}}", "type": "string" }, { "id": "7f41ce11-08fb-4b7d-a77d-d1979da38b89", "name": "invitee_end_time_seconds", "value": "={{ \n new Date(new Date($json.payload.scheduled_event.end_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getHours() * 3600 \n + new Date(new Date($json.payload.scheduled_event.end_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getMinutes() * 60 \n + new Date(new Date($json.payload.scheduled_event.end_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getSeconds() \n}}", "type": "string" }, { "id": "0b27cb18-7066-449e-a038-1ae1be4b9301", "name": "event_start_date_time", "value": "={{ new Date($('Calendly Trigger').item.json.payload.scheduled_event.start_time).getTime() / 1000 }}", "type": "string" }, { "id": "b62eaabe-acd0-4718-88d7-ff678cb115c7", "name": "event_end_date_time", "value": "={{ new Date($('Calendly Trigger').item.json.payload.scheduled_event.end_time).getTime() / 1000 }}", "type": "string" }, { "id": "f2fc37a2-63bf-4c14-aab0-c3030c98312c", "name": "invitee_start_date", "value": "={{ \n new Date(new Date($json.payload.scheduled_event.start_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getTime() / 1000 \n}}", "type": "string" }, { "id": "00dd8c90-74df-4240-a76a-cedca6211380", "name": "invitee_end_date", "value": "={{ \n new Date(new Date($json.payload.scheduled_event.end_time).toLocaleString('en-US', { timeZone: $json.payload.timezone })).getTime() / 1000 \n}}", "type": "string" } ] }, "options": {} }, "id": "2805ab10-e3a7-41ba-acbb-0dee447bcf5b", "name": "timestamp config", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 1220, 160 ] }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 }, "conditions": [ { "id": "61a4200d-9660-488a-ad0a-ea03d37f69d3", "leftValue": "={{ $('Calendly Trigger').item.json.payload.scheduled_event.status }}", "rightValue": "active", "operator": { "type": "string", "operation": "equals", "name": "filter.operator.equals" } } ], "combinator": "and" }, "options": {} }, "id": "613e3191-ab06-4507-95a1-b5c17079a588", "name": "event status check", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ 1640, 160 ] }, { "parameters": { "assignments": { "assignments": [ { "id": "65e82192-4f98-4cb4-b95d-936f0ef5536a", "name": "invitee_first_name", "value": "={{ \n $('Calendly Trigger').item.json.payload.first_name \n ? $('Calendly Trigger').item.json.payload.first_name \n : (\n $('Calendly Trigger').item.json.payload.name \n ? $('Calendly Trigger').item.json.payload.name.split(' ').slice(0, 2).join(' ') \n : ''\n ) \n}}", "type": "string" }, { "id": "335d72c9-fe61-4eee-a652-dd5bd86bda2b", "name": "invitee_last_name", "value": "={{ \n $('Calendly Trigger').item.json.payload.last_name \n ? $('Calendly Trigger').item.json.payload.last_name \n : (\n $('Calendly Trigger').item.json.payload.name \n ? $('Calendly Trigger').item.json.payload.name.split(' ').slice(-1)[0] \n : ''\n ) \n}}", "type": "string" }, { "id": "34ea812c-5b71-464c-b3a0-8f18e014a097", "name": "invitee_mobile", "value": "={{ $('Calendly Trigger').item.json.payload.text_reminder_number.replace('+', '00').replace(/\\s+/g, '') }}", "type": "string" } ] }, "options": {} }, "id": "5112c56f-14ae-4250-804c-d4306617527b", "name": "name and phone config", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 1400, 160 ] }, { "parameters": { "resource": "subscriber", "operation": "subscribe", "email": "={{ $('Calendly Trigger').item.json.payload.email }}", "smsNumber": "={{ $('name and phone config').item.json.invitee_mobile }}", "fields": { "dataFields": [ { "fieldValue": "={{ $('name and phone config').item.json.invitee_first_name }}" }, { "fieldValue": "={{ $('name and phone config').item.json.invitee_last_name }}" }, { "fieldValue": "={{ $('Calendly Trigger').item.json.payload.scheduled_event.name }}" }, { "fieldValue": "={{ $('Calendly Trigger').item.json.payload.scheduled_event.location.join_url }}" }, { "fieldValue": "={{ $('Calendly Trigger').item.json.payload.reschedule_url }}" }, { "fieldValue": "={{ $('Calendly Trigger').item.json.payload.cancel_url }}" }, { "fieldValue": "={{ $('timestamp config').item.json.event_start_date_time }}" }, { "fieldValue": "={{ $('timestamp config').item.json.event_end_date_time }}" }, { "fieldValue": "={{ $('timestamp config').item.json.invitee_start_date }}" }, { "fieldValue": "={{ $('timestamp config').item.json.invitee_end_date }}" }, { "fieldValue": "={{ $('timestamp config').item.json.invitee_start_time_seconds }}" }, { "fieldValue": "={{ $('timestamp config').item.json.invitee_end_time_seconds }}" }, { "fieldValue": "={{ $('Calendly Trigger').item.json.payload.timezone }}" } ] } }, "id": "b2c39a87-2f2f-4f76-b9f4-7966edbeede2", "name": "KlickTipp event booking", "type": "n8n-nodes-klicktipp.klicktipp", "typeVersion": 2, "position": [ 1940, 140 ], "credentials": { "klickTippApi": { "id": "fysNIl2Ak3rBr8Wb", "name": "Ricardo's KlickTipp account" } } }, { "parameters": { "resource": "subscriber", "operation": "subscribe", "email": "={{ $('Calendly Trigger').item.json.payload.email }}", "smsNumber": "={{ $('name and phone config').item.json.invitee_mobile }}" }, "id": "fa59de27-fedb-4d11-a8a1-a5242e15b0db", "name": "KlickTipp event cancellation", "type": "n8n-nodes-klicktipp.klicktipp", "typeVersion": 2, "position": [ 1940, 360 ], "credentials": { "klickTippApi": { "id": "fysNIl2Ak3rBr8Wb", "name": "Ricardo's KlickTipp account" } } }, { "parameters": { "content": "## KlickTipp Node Field Mapping - Info\n\nBefore mapping the fields within the KlickTipp node, it is important to create the corresponding fields in your KlickTipp Account beforehand. The transmitted parameters do not correspond to any of the standard fields of KlickTipp - therefore you will need to create new custom fields.\n\nBelow you find the necessary fields for reference:\n\n![Screenshot Description](https://mail.cdndata.io/user/images/kt1073234/share_link_calendly_fields.png)\n\nAfter you created those fields inside of KlickTipp you will find the fields under → Field Name inside the KlickTipp Node.\n\n**Be aware that it may take some time to sync the freshly created fields to n8n. In case you can not find the fields - delete your credentials and try to reconnect your KlickTipp account after 10-15 minutes. \n\n", "height": 751.1783719059426, "width": 498.2677165354334 }, "id": "ef8ce31c-3935-44aa-83b9-ee08df1751a1", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ 1920, 560 ] } ], "pinData": {}, "connections": { "Calendly Trigger": { "main": [ [ { "node": "timestamp config", "type": "main", "index": 0 } ] ] }, "timestamp config": { "main": [ [ { "node": "name and phone config", "type": "main", "index": 0 } ] ] }, "event status check": { "main": [ [ { "node": "KlickTipp event booking", "type": "main", "index": 0 } ], [ { "node": "KlickTipp event cancellation", "type": "main", "index": 0 } ] ] }, "name and phone config": { "main": [ [ { "node": "event status check", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1", "timezone": "Europe/Berlin", "saveManualExecutions": true, "callerPolicy": "workflowsFromSameOwner" }, "versionId": "fb67af36-66f2-45bd-be70-785f958116c4", "meta": { "templateCredsSetupCompleted": true, "instanceId": "95b3ab5a70ab1c8c1906357a367f1b236ef12a1409406fd992f60255f0f95f85" }, "id": "bh3gi1XqFLylKdry", "tags": [] }