Files
n8n/flows/37.json

1779 lines
43 KiB
JSON
Raw Normal View History

2022-06-21 21:00:40 +00:00
{
"id": 37,
"name": "avtomoto25 new date",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
-980,
420
2022-06-21 21:00:40 +00:00
]
},
{
"parameters": {
"operation": "update",
"calendar": "hvttbe9pijtp5c3iqiaj1rfvps%40group.calendar.google.com",
"eventId": "31g2bcqsnqavh7e5deusa8b2oq\t",
"updateFields": {
"allday": "yes",
2022-06-22 21:00:33 +00:00
"end": "= {{$json[\"date\"][\"google\"]}} 23:00:00",
"start": "= {{$json[\"date\"][\"google\"]}} 01:00:00"
2022-06-21 21:00:40 +00:00
}
},
"name": "Google Calendar",
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1,
"position": [
500,
2022-06-22 21:00:33 +00:00
680
2022-06-21 21:00:40 +00:00
],
"credentials": {
"googleCalendarOAuth2Api": {
"id": "6",
"name": "Google Calendar account"
}
}
},
{
"parameters": {
"operation": "update",
"calendar": "hvttbe9pijtp5c3iqiaj1rfvps%40group.calendar.google.com",
"eventId": "3ptu0erou5f816kglu1f2p0p28",
"updateFields": {
"allday": "yes",
2022-06-23 21:00:30 +00:00
"end": "={{$json[\"date\"][\"google\"]}} 23:00:00",
"start": "={{$json[\"date\"][\"google\"]}} 01:00:00"
2022-06-21 21:00:40 +00:00
}
},
"name": "Google Calendar3",
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1,
"position": [
2022-06-22 21:00:33 +00:00
500,
2022-06-23 21:00:30 +00:00
1700
2022-06-21 21:00:40 +00:00
],
"credentials": {
"googleCalendarOAuth2Api": {
"id": "6",
"name": "Google Calendar account"
}
}
},
{
"parameters": {
"url": "https://note.cynic.club/shares/sJeGN4mi8Xgto8A85QS027",
"responseFormat": "string",
"options": {}
},
"name": "HTTP Request2",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
-500,
2022-06-22 21:00:33 +00:00
500
2022-06-21 21:00:40 +00:00
]
},
{
"parameters": {
"url": "https://note.cynic.club/shares/wjFwc3x9h7lDRK9BlubQC0",
"responseFormat": "string",
"options": {}
},
"name": "HTTP Request3",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
-520,
980
]
},
{
"parameters": {
"url": "https://note.cynic.club/shares/978uO9kCnw65J1TMaH0XeR",
"responseFormat": "string",
"options": {}
},
"name": "HTTP Request4",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
-520,
2022-06-21 21:00:40 +00:00
1340
]
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 10,
"unit": "minutes"
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
-960,
2022-06-22 21:00:33 +00:00
980
2022-06-21 21:00:40 +00:00
]
},
{
"parameters": {
"mode": "removeKeyMatches",
2022-06-22 21:00:33 +00:00
"propertyName1": "date.google",
2022-06-21 21:00:40 +00:00
"propertyName2": "date"
},
"name": "Merge3",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
160,
2022-06-22 21:00:33 +00:00
520
2022-06-21 21:00:40 +00:00
]
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"returnAll": true,
"additionalOptions": {
"filter": {
"filterProperties": [
{
"field": "address",
"values": "вул. Рокосовського 51"
}
]
}
}
},
"name": "rokoss1",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
2022-06-22 21:00:33 +00:00
-100,
700
2022-06-21 21:00:40 +00:00
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"mode": "removeKeyMatches",
2022-06-23 21:00:30 +00:00
"propertyName1": "date.google",
2022-06-21 21:00:40 +00:00
"propertyName2": "date"
},
"name": "Merge4",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
160,
2022-06-21 21:00:40 +00:00
1000
]
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"returnAll": true,
"additionalOptions": {
"filter": {
"filterProperties": [
{
"field": "address",
2022-06-23 21:00:30 +00:00
"values": "вул. Красносільського 59а"
2022-06-21 21:00:40 +00:00
}
]
}
}
},
"name": "masani2",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
-100,
2022-06-21 21:00:40 +00:00
1160
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"operation": "update",
"calendar": "hvttbe9pijtp5c3iqiaj1rfvps%40group.calendar.google.com",
"eventId": "397fskc0hc9vfl1dqffnbjlm7k",
"updateFields": {
"allday": "yes",
2022-06-23 21:00:30 +00:00
"end": "= {{$json[\"date\"][\"google\"]}} 23:00:00",
"start": "= {{$json[\"date\"][\"google\"]}} 01:00:00"
2022-06-21 21:00:40 +00:00
}
},
"name": "Google Calendar4",
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1,
"position": [
500,
2022-06-23 21:00:30 +00:00
1180
2022-06-21 21:00:40 +00:00
],
"credentials": {
"googleCalendarOAuth2Api": {
"id": "6",
"name": "Google Calendar account"
}
}
},
{
"parameters": {
"mode": "removeKeyMatches",
2022-06-23 21:00:30 +00:00
"propertyName1": "date.google",
2022-06-21 21:00:40 +00:00
"propertyName2": "date"
},
"name": "Merge5",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
160,
2022-06-21 21:00:40 +00:00
1360
]
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"returnAll": true,
"additionalOptions": {
"filter": {
"filterProperties": [
{
"field": "address",
"values": "Проспект Перемоги 39"
}
]
}
}
},
"name": "prospect",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
-100,
1540
2022-06-21 21:00:40 +00:00
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
2022-06-22 21:00:33 +00:00
},
{
"parameters": {
"graphApiVersion": "v13.0",
"node": "me",
"edge": "accounts",
"options": {}
},
"name": "Get Pages",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
760,
520
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"name": "Split Pages",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
1000,
520
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"id\"]}}",
"value2": "105101524930750"
}
]
}
},
"name": "Is Tom Travels?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1260,
520
]
},
{
"parameters": {
"httpRequestMethod": "POST",
"graphApiVersion": "v13.0",
"node": "={{$json[\"id\"]}}",
"edge": "feed",
"options": {
"queryParameters": {
"parameter": [
{
"name": "message",
"value": "=Розпочато запис на навчання за адресою:\n{{$node[\"rokoss1\"].json[\"address\"]}}\nПочаток занятть: {{$node[\"rokoss2\"].json[\"date_ua\"]}}"
},
{
"name": "access_token",
"value": "={{$json[\"access_token\"]}}"
},
{
"name": "link",
"value": "https://avtomoto25.cn.ua/booking/"
},
{
"name": "og_action_type_id",
"value": "383634835006146"
},
{
"name": "og_object_id",
"value": "387919524627259"
}
]
}
}
},
"name": "Facebook Graph API2",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1520,
520
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "data",
"cssSelector": "li",
"returnArray": true
},
{
"key": "schedule",
"cssSelector": "label.checkbox-label-checked",
"returnArray": true
}
]
},
"options": {}
},
"name": "HTML Extract",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
-280,
500
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "date.ua",
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").setLocale('uk').toFormat('dd MMMM yyyy року')}}"
},
{
"name": "date.ru",
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").setLocale('ru').toFormat('dd MMMM yyyy года')}}"
},
{
"name": "schedule.ua.day1",
"value": "={{$json[\"schedule\"][0]}}"
},
{
"name": "schedule.ua.day2",
"value": "={{$json[\"schedule\"][1]}}"
},
{
"name": "schedule.ru.day1",
"value": "={{$json[\"schedule\"][0].replace(\"понеділок\", \"понедельник\").replace(\"вівторок\", \"вторник\").replace(\"середа\", \"среда\").replace(\"четвер\", \"четверг\").replace(\"п’ятниця\", \"пятница\").replace(\"субота\", \"суббота\").replace(\"неділя\", \"воскресенье\")}}"
},
{
"name": "schedule.ru.day2",
"value": "={{$json[\"schedule\"][1].replace(\"понеділок\", \"понедельник\").replace(\"вівторок\", \"вторник\").replace(\"середа\", \"среда\").replace(\"четвер\", \"четверг\").replace(\"п’ятниця\", \"пятница\").replace(\"субота\", \"суббота\").replace(\"неділя\", \"воскресенье\")}}"
},
{
"name": "schedule.time",
"value": "={{$json[\"data\"][9]}}"
},
{
"name": "date.google",
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").toISODate()}}"
}
]
},
"options": {
"dotNotation": true
}
},
"name": "Set rokoss",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
-100,
500
]
},
{
"parameters": {
"operation": "update",
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"rowId": "1",
"fieldsToSend": {
"properties": [
{
"fieldId": "date_ru",
"fieldValue": "={{$json[\"date\"][\"ru\"]}}"
},
{
"fieldId": "date_ua",
"fieldValue": "={{$json[\"date\"][\"ua\"]}}"
},
{
"fieldId": "day_1_ua",
"fieldValue": "={{$json[\"schedule\"][\"ua\"][\"day1\"]}}"
},
{
"fieldId": "day_2_ua",
"fieldValue": "={{$json[\"schedule\"][\"ua\"][\"day2\"]}}"
},
{
"fieldId": "time",
"fieldValue": "={{$json[\"schedule\"][\"time\"]}}"
},
{
"fieldId": "day_1_ru",
"fieldValue": "={{$json[\"schedule\"][\"ru\"][\"day1\"]}}"
},
{
"fieldId": "day_2_ru",
"fieldValue": "={{$json[\"schedule\"][\"ru\"][\"day2\"]}}"
},
{
"fieldId": "date",
"fieldValue": "={{$json[\"date\"][\"google\"]}}"
}
]
}
},
"name": "rokoss2",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
500,
520
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"url": "https://avtomoto25.cn.ua/wp-content/uploads/new_data.jpg",
"responseFormat": "file",
"options": {}
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
500,
340
]
},
{
"parameters": {
"operation": "multiStep",
"operations": {
"operations": [
{
"operation": "text",
"text": "Розпочато запис на \nнавчання за адресою",
"fontSize": 36,
"fontColor": "#EDEDED",
"positionY": 480
},
{
"operation": "text",
"text": "вул. Рокосовського 51",
"fontSize": 56,
"fontColor": "#FFFFFF",
"positionY": 580,
"font": "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf"
},
{
"operation": "text",
"text": "Початок занятть",
"fontSize": 36,
"fontColor": "#EDEDED",
"positionY": 660
},
{
"operation": "text",
"text": "={{$json[\"date\"][\"ua\"]}}",
"fontSize": 56,
"fontColor": "#FFFFFF",
"positionY": 720,
"font": "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf"
2022-06-23 21:00:30 +00:00
}
2022-06-22 21:00:33 +00:00
]
},
"options": {}
},
"name": "Edit Image",
"type": "n8n-nodes-base.editImage",
"typeVersion": 1,
"position": [
760,
340
]
},
{
"parameters": {
"resource": "file",
"binaryPropertyName": "=data",
"path": "/var/www/html/driving_school/wp-content/uploads/",
"options": {
2022-06-23 21:00:30 +00:00
"fileName": "new_data_rokoss.jpg"
2022-06-22 21:00:33 +00:00
}
},
"name": "SSH",
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
1000,
340
],
"credentials": {
"sshPassword": {
"id": "14",
"name": "SSH Password account"
}
}
},
2022-06-23 21:00:30 +00:00
{
"parameters": {
"graphApiVersion": "v13.0",
"node": "me",
"edge": "accounts",
"options": {}
},
"name": "Get Pages1",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1200,
340
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"name": "Split Pages1",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
1380,
340
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"id\"]}}",
"value2": "105101524930750"
}
]
}
},
"name": "Is Tom Travels?1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1580,
340
]
},
{
"parameters": {
"httpRequestMethod": "POST",
"graphApiVersion": "v13.0",
"node": "={{$json[\"id\"]}}",
"edge": "photos",
"options": {
"queryParameters": {
"parameter": [
{
"name": "access_token",
"value": "={{$json[\"access_token\"]}}"
},
{
"name": "url",
"value": "https://avtomoto25.cn.ua/wp-content/uploads/new_data_rokoss.jpg"
},
{
"name": "caption",
2022-06-29 21:00:55 +00:00
"value": "Розпочато нову реєстрацію на навчання в нашій автошколі. \nЗаповніть форму 🎯 https://avtomoto25.cn.ua/booking/\nабо телефонуйте ☎️ +380735650500 ☎️ +380965650500\n"
2022-06-23 21:00:30 +00:00
}
]
}
}
},
"name": "Facebook Graph API",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1800,
340
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
2022-06-22 21:00:33 +00:00
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
2022-06-23 21:00:30 +00:00
"name": "date.ua",
2022-06-22 21:00:33 +00:00
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").setLocale('uk').toFormat('dd MMMM yyyy року')}}"
},
{
2022-06-23 21:00:30 +00:00
"name": "date.ru",
2022-06-22 21:00:33 +00:00
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").setLocale('ru').toFormat('dd MMMM yyyy года')}}"
},
{
2022-06-23 21:00:30 +00:00
"name": "schedule.ua.day1",
"value": "={{$json[\"schedule\"][0]}}"
2022-06-22 21:00:33 +00:00
},
{
2022-06-23 21:00:30 +00:00
"name": "schedule.ua.day2",
"value": "={{$json[\"schedule\"][1]}}"
2022-06-22 21:00:33 +00:00
},
{
2022-06-23 21:00:30 +00:00
"name": "schedule.ru.day1",
"value": "={{$json[\"schedule\"][0].replace(\"понеділок\", \"понедельник\").replace(\"вівторок\", \"вторник\").replace(\"середа\", \"среда\").replace(\"четвер\", \"четверг\").replace(\"п’ятниця\", \"пятница\").replace(\"субота\", \"суббота\").replace(\"неділя\", \"воскресенье\")}}"
2022-06-22 21:00:33 +00:00
},
{
2022-06-23 21:00:30 +00:00
"name": "schedule.ru.day2",
"value": "={{$json[\"schedule\"][1].replace(\"понеділок\", \"понедельник\").replace(\"вівторок\", \"вторник\").replace(\"середа\", \"среда\").replace(\"четвер\", \"четверг\").replace(\"п’ятниця\", \"пятница\").replace(\"субота\", \"суббота\").replace(\"неділя\", \"воскресенье\")}}"
2022-06-22 21:00:33 +00:00
},
{
2022-06-23 21:00:30 +00:00
"name": "schedule.time",
"value": "={{$json[\"data\"][9]}}"
2022-06-22 21:00:33 +00:00
},
{
2022-06-23 21:00:30 +00:00
"name": "date.google",
2022-06-22 21:00:33 +00:00
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").toISODate()}}"
}
]
},
"options": {
"dotNotation": true
}
},
2022-06-23 21:00:30 +00:00
"name": "Set masani",
2022-06-22 21:00:33 +00:00
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
2022-06-23 21:00:30 +00:00
-100,
980
]
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "data",
"cssSelector": "li",
"returnArray": true
},
{
"key": "schedule",
"cssSelector": "label.checkbox-label-checked",
"returnArray": true
}
]
},
"options": {}
},
"name": "HTML Extract1",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
-280,
980
]
},
{
"parameters": {
"url": "https://avtomoto25.cn.ua/wp-content/uploads/new_data.jpg",
"responseFormat": "file",
"options": {}
},
"name": "HTTP Request5",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
500,
840
]
},
{
"parameters": {
"operation": "multiStep",
"operations": {
"operations": [
{
"operation": "text",
"text": "Розпочато запис на \nнавчання за адресою",
"fontSize": 36,
"fontColor": "#EDEDED",
"positionY": 480
},
{
"operation": "text",
"text": "вул. Красносільського 59а",
"fontSize": 56,
"fontColor": "#FFFFFF",
"positionY": 580,
"font": "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf"
},
{
"operation": "text",
"text": "Початок занятть",
"fontSize": 36,
"fontColor": "#EDEDED",
"positionY": 660
},
{
"operation": "text",
"text": "={{$json[\"date\"][\"ua\"]}}",
"fontSize": 56,
"fontColor": "#FFFFFF",
"positionY": 720,
"font": "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf"
}
]
},
"options": {}
},
"name": "Edit Image2",
"type": "n8n-nodes-base.editImage",
"typeVersion": 1,
"position": [
760,
840
]
},
{
"parameters": {
"resource": "file",
"binaryPropertyName": "=data",
"path": "/var/www/html/driving_school/wp-content/uploads/",
"options": {
"fileName": "new_data_masani.jpg"
}
},
"name": "SSH2",
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
1000,
840
],
"credentials": {
"sshPassword": {
"id": "14",
"name": "SSH Password account"
}
}
},
{
"parameters": {
"graphApiVersion": "v13.0",
"node": "me",
"edge": "accounts",
"options": {}
},
"name": "Get Pages3",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1200,
840
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"name": "Split Pages3",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
1380,
840
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"id\"]}}",
"value2": "105101524930750"
}
]
}
},
"name": "Is Tom Travels?3",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1580,
840
]
},
{
"parameters": {
"httpRequestMethod": "POST",
"graphApiVersion": "v13.0",
"node": "={{$json[\"id\"]}}",
"edge": "photos",
"options": {
"queryParameters": {
"parameter": [
{
"name": "access_token",
"value": "={{$json[\"access_token\"]}}"
},
{
"name": "url",
"value": "https://avtomoto25.cn.ua/wp-content/uploads/new_data_masani.jpg"
},
{
"name": "caption",
2022-06-29 21:00:55 +00:00
"value": "Розпочато нову реєстрацію на навчання в нашій автошколі. \nЗаповніть форму 🎯 https://avtomoto25.cn.ua/booking/\nабо телефонуйте ☎️ +380735650500 ☎️ +380965650500\n"
2022-06-23 21:00:30 +00:00
}
]
}
}
},
"name": "Facebook Graph API3",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1800,
840
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"operation": "update",
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"rowId": "2",
"fieldsToSend": {
"properties": [
{
"fieldId": "date_ru",
"fieldValue": "={{$json[\"date\"][\"ru\"]}}"
},
{
"fieldId": "date_ua",
"fieldValue": "={{$json[\"date\"][\"ua\"]}}"
},
{
"fieldId": "day_1_ua",
"fieldValue": "={{$json[\"schedule\"][\"ua\"][\"day1\"]}}"
},
{
"fieldId": "day_2_ua",
"fieldValue": "={{$json[\"schedule\"][\"ua\"][\"day2\"]}}"
},
{
"fieldId": "time",
"fieldValue": "={{$json[\"schedule\"][\"time\"]}}"
},
{
"fieldId": "day_1_ru",
"fieldValue": "={{$json[\"schedule\"][\"ru\"][\"day1\"]}}"
},
{
"fieldId": "day_2_ru",
"fieldValue": "={{$json[\"schedule\"][\"ru\"][\"day2\"]}}"
},
{
"fieldId": "date",
"fieldValue": "={{$json[\"date\"][\"google\"]}}"
}
]
}
},
"name": "masani",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
500,
1020
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "data",
"cssSelector": "li",
"returnArray": true
},
{
"key": "schedule",
"cssSelector": "label.checkbox-label-checked",
"returnArray": true
}
]
},
"options": {}
},
"name": "HTML Extract2",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
-280,
1340
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "date.ua",
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").setLocale('uk').toFormat('dd MMMM yyyy року')}}"
},
{
"name": "date.ru",
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").setLocale('ru').toFormat('dd MMMM yyyy года')}}"
},
{
"name": "schedule.ua.day1",
"value": "={{$json[\"schedule\"][0]}}"
},
{
"name": "schedule.ua.day2",
"value": "={{$json[\"schedule\"][1]}}"
},
{
"name": "schedule.ru.day1",
"value": "={{$json[\"schedule\"][0].replace(\"понеділок\", \"понедельник\").replace(\"вівторок\", \"вторник\").replace(\"середа\", \"среда\").replace(\"четвер\", \"четверг\").replace(\"п’ятниця\", \"пятница\").replace(\"субота\", \"суббота\").replace(\"неділя\", \"воскресенье\")}}"
},
{
"name": "schedule.ru.day2",
"value": "={{$json[\"schedule\"][1].replace(\"понеділок\", \"понедельник\").replace(\"вівторок\", \"вторник\").replace(\"середа\", \"среда\").replace(\"четвер\", \"четверг\").replace(\"п’ятниця\", \"пятница\").replace(\"субота\", \"суббота\").replace(\"неділя\", \"воскресенье\")}}"
},
{
"name": "schedule.time",
"value": "={{$json[\"data\"][9]}}"
},
{
"name": "date.google",
"value": "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").toISODate()}}"
}
]
},
"options": {
"dotNotation": true
}
},
"name": "Set prospect",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
-100,
1340
]
},
{
"parameters": {
"operation": "update",
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"rowId": "3",
"fieldsToSend": {
"properties": [
{
"fieldId": "date_ru",
"fieldValue": "={{$json[\"date\"][\"ru\"]}}"
},
{
"fieldId": "date_ua",
"fieldValue": "={{$json[\"date\"][\"ua\"]}}"
},
{
"fieldId": "day_1_ua",
"fieldValue": "={{$json[\"schedule\"][\"ua\"][\"day1\"]}}"
},
{
"fieldId": "day_2_ua",
"fieldValue": "={{$json[\"schedule\"][\"ua\"][\"day2\"]}}"
},
{
"fieldId": "time",
"fieldValue": "={{$json[\"schedule\"][\"time\"]}}"
},
{
"fieldId": "day_1_ru",
"fieldValue": "={{$json[\"schedule\"][\"ru\"][\"day1\"]}}"
},
{
"fieldId": "day_2_ru",
"fieldValue": "={{$json[\"schedule\"][\"ru\"][\"day2\"]}}"
},
{
"fieldId": "date",
"fieldValue": "={{$json[\"date\"][\"google\"]}}"
}
]
}
},
"name": "prospect1",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
500,
1520
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"url": "https://avtomoto25.cn.ua/wp-content/uploads/new_data.jpg",
"responseFormat": "file",
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
500,
1360
2022-06-22 21:00:33 +00:00
]
2022-06-23 21:00:30 +00:00
},
{
"parameters": {
"operation": "multiStep",
"operations": {
"operations": [
{
"operation": "text",
"text": "Розпочато запис на \nнавчання за адресою",
"fontSize": 36,
"fontColor": "#EDEDED",
"positionY": 480
},
{
"operation": "text",
"text": "Проспект Перемоги 39",
"fontSize": 56,
"fontColor": "#FFFFFF",
"positionY": 580,
"font": "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf"
},
{
"operation": "text",
"text": "Початок занятть",
"fontSize": 36,
"fontColor": "#EDEDED",
"positionY": 660
},
{
"operation": "text",
"text": "={{$json[\"date\"][\"ua\"]}}",
"fontSize": 56,
"fontColor": "#FFFFFF",
"positionY": 720,
"font": "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf"
}
]
},
"options": {}
},
"name": "Edit Image3",
"type": "n8n-nodes-base.editImage",
"typeVersion": 1,
"position": [
760,
1360
]
},
{
"parameters": {
"resource": "file",
"binaryPropertyName": "=data",
"path": "/var/www/html/driving_school/wp-content/uploads/",
"options": {
"fileName": "new_data_prospect.jpg"
}
},
"name": "SSH3",
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
1000,
1360
],
"credentials": {
"sshPassword": {
"id": "14",
"name": "SSH Password account"
}
}
},
{
"parameters": {
"graphApiVersion": "v13.0",
"node": "me",
"edge": "accounts",
"options": {}
},
"name": "Get Pages4",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1200,
1360
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"name": "Split Pages4",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
1380,
1360
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"id\"]}}",
"value2": "105101524930750"
}
]
}
},
"name": "Is Tom Travels?4",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1580,
1360
]
},
{
"parameters": {
"httpRequestMethod": "POST",
"graphApiVersion": "v13.0",
"node": "={{$json[\"id\"]}}",
"edge": "photos",
"options": {
"queryParameters": {
"parameter": [
{
"name": "access_token",
"value": "={{$json[\"access_token\"]}}"
},
{
"name": "url",
"value": "https://avtomoto25.cn.ua/wp-content/uploads/new_data_prospect.jpg"
},
{
"name": "caption",
2022-06-29 21:00:55 +00:00
"value": "Розпочато нову реєстрацію на навчання в нашій автошколі. \nЗаповніть форму 🎯 https://avtomoto25.cn.ua/booking/\nабо телефонуйте ☎️ +380735650500 ☎️ +380965650500\n"
2022-06-23 21:00:30 +00:00
}
]
}
}
},
"name": "Facebook Graph API4",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1800,
1360
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
2022-06-21 21:00:40 +00:00
}
],
"connections": {
"HTTP Request2": {
"main": [
[
{
2022-06-22 21:00:33 +00:00
"node": "HTML Extract",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
"HTTP Request3": {
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "HTML Extract1",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"HTTP Request4": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "HTML Extract2",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Cron": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "HTTP Request2",
"type": "main",
"index": 0
},
{
"node": "HTTP Request3",
"type": "main",
"index": 0
},
{
"node": "HTTP Request4",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Merge3": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Google Calendar",
"type": "main",
"index": 0
},
{
"node": "rokoss2",
"type": "main",
"index": 0
},
{
"node": "HTTP Request1",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"rokoss1": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Merge3",
"type": "main",
"index": 1
}
]
]
},
"masani2": {
"main": [
[
{
"node": "Merge4",
"type": "main",
"index": 1
}
]
]
},
"Merge4": {
"main": [
[
{
"node": "Google Calendar4",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
},
{
2022-06-23 21:00:30 +00:00
"node": "masani",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
},
{
2022-06-23 21:00:30 +00:00
"node": "HTTP Request5",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Merge5": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Google Calendar3",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
},
{
2022-06-23 21:00:30 +00:00
"node": "prospect1",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
2022-06-22 21:00:33 +00:00
},
2022-06-21 21:00:40 +00:00
{
2022-06-23 21:00:30 +00:00
"node": "HTTP Request",
2022-06-21 21:00:40 +00:00
"type": "main",
2022-06-22 21:00:33 +00:00
"index": 0
2022-06-21 21:00:40 +00:00
}
]
]
},
2022-06-23 21:00:30 +00:00
"prospect": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Merge5",
2022-06-21 21:00:40 +00:00
"type": "main",
2022-06-22 21:00:33 +00:00
"index": 1
2022-06-21 21:00:40 +00:00
}
]
]
},
2022-06-23 21:00:30 +00:00
"Get Pages": {
"main": [
[
{
"node": "Split Pages",
"type": "main",
"index": 0
}
]
]
},
"Split Pages": {
"main": [
[
{
"node": "Is Tom Travels?",
"type": "main",
"index": 0
}
]
]
},
"Is Tom Travels?": {
"main": [
[
{
"node": "Facebook Graph API2",
"type": "main",
"index": 0
}
]
]
},
"HTML Extract": {
"main": [
[
{
"node": "Set rokoss",
"type": "main",
"index": 0
}
]
]
},
"Set rokoss": {
"main": [
[
{
"node": "Merge3",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "Edit Image",
"type": "main",
"index": 0
}
]
]
},
"Edit Image": {
"main": [
[
{
"node": "SSH",
"type": "main",
"index": 0
}
]
]
},
"Get Pages1": {
"main": [
[
{
"node": "Split Pages1",
"type": "main",
"index": 0
}
]
]
},
"Split Pages1": {
"main": [
[
{
"node": "Is Tom Travels?1",
"type": "main",
"index": 0
}
]
]
},
"Is Tom Travels?1": {
"main": [
[
{
"node": "Facebook Graph API",
"type": "main",
"index": 0
}
]
]
},
"SSH": {
"main": [
[
{
"node": "Get Pages1",
"type": "main",
"index": 0
}
]
]
},
2022-06-21 21:00:40 +00:00
"Set masani": {
"main": [
[
{
"node": "Merge4",
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"HTML Extract1": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Set masani",
2022-06-21 21:00:40 +00:00
"type": "main",
2022-06-23 21:00:30 +00:00
"index": 0
2022-06-21 21:00:40 +00:00
}
]
]
},
2022-06-23 21:00:30 +00:00
"HTTP Request5": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Edit Image2",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
2022-06-23 21:00:30 +00:00
}
]
]
},
"Edit Image2": {
"main": [
[
2022-06-21 21:00:40 +00:00
{
2022-06-23 21:00:30 +00:00
"node": "SSH2",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"SSH2": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Get Pages3",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Get Pages3": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Split Pages3",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
2022-06-23 21:00:30 +00:00
}
]
]
},
"Split Pages3": {
"main": [
[
2022-06-21 21:00:40 +00:00
{
2022-06-23 21:00:30 +00:00
"node": "Is Tom Travels?3",
2022-06-21 21:00:40 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Is Tom Travels?3": {
2022-06-21 21:00:40 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Facebook Graph API3",
2022-06-21 21:00:40 +00:00
"type": "main",
2022-06-23 21:00:30 +00:00
"index": 0
2022-06-21 21:00:40 +00:00
}
]
]
2022-06-22 21:00:33 +00:00
},
2022-06-23 21:00:30 +00:00
"HTML Extract2": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Set prospect",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Set prospect": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Merge5",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"HTTP Request": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Edit Image3",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Edit Image3": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "SSH3",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"SSH3": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Get Pages4",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Get Pages4": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Split Pages4",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Split Pages4": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Is Tom Travels?4",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
},
2022-06-23 21:00:30 +00:00
"Is Tom Travels?4": {
2022-06-22 21:00:33 +00:00
"main": [
[
{
2022-06-23 21:00:30 +00:00
"node": "Facebook Graph API4",
2022-06-22 21:00:33 +00:00
"type": "main",
"index": 0
}
]
]
2022-06-21 21:00:40 +00:00
}
},
"createdAt": "2022-06-20T08:36:58.934Z",
2022-06-29 21:00:55 +00:00
"updatedAt": "2022-06-29T12:52:43.358Z",
2022-06-21 21:00:40 +00:00
"settings": {
"errorWorkflow": "25"
},
"staticData": null,
"tags": [
{
"id": "1",
"name": "avtomoto25",
"createdAt": "2022-05-10T18:06:30.022Z",
"updatedAt": "2022-05-10T18:06:30.022Z"
}
]
}