2022-06-19 21:00:54 +00:00
{
"id" : 36 ,
2022-06-21 21:00:40 +00:00
"name" : "avtomoto25 count" ,
"active" : true ,
2022-06-19 21:00:54 +00:00
"nodes" : [
{
"parameters" : { } ,
"name" : "Start" ,
"type" : "n8n-nodes-base.start" ,
"typeVersion" : 1 ,
"position" : [
-280 ,
280
]
} ,
{
"parameters" : {
2022-06-21 21:00:40 +00:00
"graphApiVersion" : "v13.0" ,
2022-06-19 21:00:54 +00:00
"node" : "Avtomoto25" ,
"options" : {
"fields" : {
"field" : [
{
"name" : "access_token"
}
]
}
}
} ,
"name" : "Facebook Graph API" ,
"type" : "n8n-nodes-base.facebookGraphApi" ,
"typeVersion" : 1 ,
"position" : [
480 ,
60
] ,
"credentials" : {
"facebookGraphApi" : {
"id" : "36" ,
"name" : "Facebook Graph account"
}
}
} ,
{
"parameters" : {
"httpRequestMethod" : "POST" ,
2022-06-21 21:00:40 +00:00
"graphApiVersion" : "v13.0" ,
2022-06-19 21:00:54 +00:00
"node" : "Avtomoto25/feed/" ,
"options" : {
"queryParameters" : {
"parameter" : [
{
"name" : "message" ,
"value" : "Hello fans"
} ,
{
"name" : "access_token" ,
"value" : "={{$json[\"access_token\"]}}"
}
]
}
}
} ,
"name" : "Facebook Graph API1" ,
"type" : "n8n-nodes-base.facebookGraphApi" ,
"typeVersion" : 1 ,
"position" : [
700 ,
60
] ,
"credentials" : {
"facebookGraphApi" : {
"id" : "36" ,
"name" : "Facebook Graph account"
}
}
} ,
{
"parameters" : {
2022-06-21 21:00:40 +00:00
"graphApiVersion" : "v13.0" ,
2022-06-19 21:00:54 +00:00
"node" : "me" ,
"edge" : "accounts" ,
"options" : { }
} ,
"name" : "Get Pages" ,
"type" : "n8n-nodes-base.facebookGraphApi" ,
"typeVersion" : 1 ,
"position" : [
2022-06-21 21:00:40 +00:00
1240 ,
500
2022-06-19 21:00:54 +00:00
] ,
"credentials" : {
"facebookGraphApi" : {
"id" : "36" ,
"name" : "Facebook Graph account"
}
}
} ,
{
"parameters" : {
"fieldToSplitOut" : "data" ,
"options" : { }
} ,
"name" : "Split Pages" ,
"type" : "n8n-nodes-base.itemLists" ,
"typeVersion" : 1 ,
"position" : [
2022-06-21 21:00:40 +00:00
1480 ,
500
2022-06-19 21:00:54 +00:00
]
} ,
{
"parameters" : {
"conditions" : {
"string" : [
{
"value1" : "={{$json[\"id\"]}}" ,
"value2" : "105101524930750"
}
]
}
} ,
"name" : "Is Tom Travels?" ,
"type" : "n8n-nodes-base.if" ,
"typeVersion" : 1 ,
"position" : [
2022-06-21 21:00:40 +00:00
1700 ,
500
2022-06-19 21:00:54 +00:00
]
} ,
{
"parameters" : {
"httpRequestMethod" : "POST" ,
2022-06-21 21:00:40 +00:00
"graphApiVersion" : "v13.0" ,
2022-06-19 21:00:54 +00:00
"node" : "={{$json[\"id\"]}}" ,
"edge" : "feed" ,
"options" : {
"queryParameters" : {
"parameter" : [
{
"name" : "message" ,
2022-06-21 21:00:40 +00:00
"value" : "=Продовжується запис на навчання за адресою: \n{{$node[\"rokoss1\"].json[\"address\"]}}\nПо ча то к занятть: {{$node[\"rokoss1\"].json[\"date_ua\"]}}\nЗ а лишило с я місць: {{$node[\"recount rokoss\"].json[\"recount\"]}}"
2022-06-19 21:00:54 +00:00
} ,
{
"name" : "access_token" ,
"value" : "={{$json[\"access_token\"]}}"
} ,
{
"name" : "link" ,
"value" : "https://avtomoto25.cn.ua/booking/"
}
]
}
}
} ,
"name" : "Facebook Graph API2" ,
"type" : "n8n-nodes-base.facebookGraphApi" ,
"typeVersion" : 1 ,
"position" : [
2022-06-21 21:00:40 +00:00
2140 ,
320
] ,
"credentials" : {
"facebookGraphApi" : {
"id" : "36" ,
"name" : "Facebook Graph account"
}
}
} ,
{
"parameters" : {
"url" : "https://note.cynic.club/shares/sJeGN4mi8Xgto8A85QS027" ,
"responseFormat" : "string" ,
"options" : { }
} ,
"name" : "HTTP Request2" ,
"type" : "n8n-nodes-base.httpRequest" ,
"typeVersion" : 1 ,
"position" : [
0 ,
500
]
} ,
{
"parameters" : {
"extractionValues" : {
"values" : [
{
"key" : "data" ,
"cssSelector" : "li" ,
"returnArray" : true
}
]
} ,
"options" : { }
} ,
"name" : "HTML Extract1" ,
"type" : "n8n-nodes-base.htmlExtract" ,
"typeVersion" : 1 ,
"position" : [
220 ,
500
]
} ,
{
"parameters" : {
"keepOnlySet" : true ,
"values" : {
"string" : [
{
"name" : "count" ,
"value" : "={{$json[\"data\"][1]}}"
}
]
} ,
"options" : {
"dotNotation" : true
}
} ,
"name" : "Set2" ,
"type" : "n8n-nodes-base.set" ,
"typeVersion" : 1 ,
"position" : [
480 ,
500
]
} ,
{
"parameters" : {
"url" : "https://note.cynic.club/shares/wjFwc3x9h7lDRK9BlubQC0" ,
"responseFormat" : "string" ,
"options" : { }
} ,
"name" : "HTTP Request3" ,
"type" : "n8n-nodes-base.httpRequest" ,
"typeVersion" : 1 ,
"position" : [
0 ,
840
]
} ,
{
"parameters" : {
"url" : "https://note.cynic.club/shares/978uO9kCnw65J1TMaH0XeR" ,
"responseFormat" : "string" ,
"options" : { }
} ,
"name" : "HTTP Request4" ,
"type" : "n8n-nodes-base.httpRequest" ,
"typeVersion" : 1 ,
"position" : [
0 ,
1400
] ,
"disabled" : true
} ,
{
"parameters" : {
"extractionValues" : {
"values" : [
{
"key" : "data" ,
"cssSelector" : "li" ,
"returnArray" : true
} ,
{
"key" : "schedule" ,
"cssSelector" : "label.checkbox-label-checked" ,
"returnArray" : true
}
]
} ,
"options" : { }
} ,
"name" : "HTML Extract3" ,
"type" : "n8n-nodes-base.htmlExtract" ,
"typeVersion" : 1 ,
"position" : [
220 ,
1400
]
} ,
{
"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" : "count" ,
"value" : "={{$json[\"data\"][1]}}"
} ,
{
"name" : "date.google" ,
"value" : "={{DateTime.fromFormat($json[\"data\"][0], \"dd.MM.yyyy\").toISODate()}}"
} ,
{
"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]}}"
}
]
} ,
"options" : {
"dotNotation" : true
}
} ,
"name" : "Set4" ,
"type" : "n8n-nodes-base.set" ,
"typeVersion" : 1 ,
"position" : [
480 ,
1400
]
} ,
{
"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" : "date" ,
"fieldValue" : "={{$json[\"date\"][\"google\"]}}"
} ,
{
"fieldId" : "day_1_ua" ,
"fieldValue" : "={{$json[\"schedule\"][\"ua\"][\"day1\"]}}"
} ,
{
"fieldId" : "day_2_ua" ,
"fieldValue" : "={{$json[\"schedule\"][\"ua\"][\"day2\"]}}"
} ,
{
"fieldId" : "count" ,
"fieldValue" : "={{$json[\"count\"]}}"
} ,
{
"fieldId" : "time" ,
"fieldValue" : "={{$json[\"schedule\"][\"time\"]}}"
} ,
{
"fieldId" : "day_1_ru" ,
"fieldValue" : "={{$json[\"schedule\"][\"ru\"][\"day1\"]}}"
} ,
{
"fieldId" : "day_2_ru" ,
"fieldValue" : "={{$json[\"schedule\"][\"ru\"][\"day2\"]}}"
}
]
}
} ,
"name" : "prospect" ,
"type" : "n8n-nodes-base.grist" ,
"typeVersion" : 1 ,
"position" : [
700 ,
1400
] ,
"credentials" : {
"gristApi" : {
"id" : "21" ,
"name" : "Grist account"
}
}
} ,
{
"parameters" : {
"triggerTimes" : {
"item" : [
{
"mode" : "everyX" ,
"value" : 10 ,
"unit" : "minutes"
}
]
}
} ,
"name" : "Cron" ,
"type" : "n8n-nodes-base.cron" ,
"typeVersion" : 1 ,
"position" : [
-340 ,
740
]
} ,
{
"parameters" : {
"mode" : "removeKeyMatches" ,
"propertyName1" : "count" ,
"propertyName2" : "count"
} ,
"name" : "Merge3" ,
"type" : "n8n-nodes-base.merge" ,
"typeVersion" : 1 ,
"position" : [
780 ,
520
]
} ,
{
"parameters" : {
"docId" : "tAuWNMisjXqyEkYudRcA2c" ,
"tableId" : "Classrooms" ,
"returnAll" : true ,
"additionalOptions" : {
"filter" : {
"filterProperties" : [
{
"field" : "address" ,
"values" : "вул. Рокосовського 51"
}
]
}
}
} ,
"name" : "rokoss1" ,
"type" : "n8n-nodes-base.grist" ,
"typeVersion" : 1 ,
"position" : [
480 ,
660
] ,
"credentials" : {
"gristApi" : {
"id" : "21" ,
"name" : "Grist account"
}
}
} ,
{
"parameters" : {
"operation" : "update" ,
"docId" : "tAuWNMisjXqyEkYudRcA2c" ,
"tableId" : "Classrooms" ,
"rowId" : "1" ,
"fieldsToSend" : {
"properties" : [
{
"fieldId" : "count" ,
"fieldValue" : "={{$json[\"count\"]}}"
}
]
}
} ,
"name" : "rokoss2" ,
"type" : "n8n-nodes-base.grist" ,
"typeVersion" : 1 ,
"position" : [
1040 ,
680
] ,
"credentials" : {
"gristApi" : {
"id" : "21" ,
"name" : "Grist account"
}
}
} ,
{
"parameters" : {
"values" : {
"number" : [
{
"name" : "recount" ,
"value" : "={{22 - $json[\"count\"]}}"
}
]
} ,
"options" : { }
} ,
"name" : "recount rokoss" ,
"type" : "n8n-nodes-base.set" ,
"typeVersion" : 1 ,
"position" : [
1020 ,
500
]
} ,
{
"parameters" : {
"extractionValues" : {
"values" : [
{
"key" : "data" ,
"cssSelector" : "li" ,
"returnArray" : true
}
]
} ,
"options" : { }
} ,
"name" : "HTML Extract" ,
"type" : "n8n-nodes-base.htmlExtract" ,
"typeVersion" : 1 ,
"position" : [
220 ,
840
]
} ,
{
"parameters" : {
"keepOnlySet" : true ,
"values" : {
"string" : [
{
"name" : "count" ,
"value" : "={{$json[\"data\"][1]}}"
}
]
} ,
"options" : {
"dotNotation" : true
}
} ,
"name" : "Set" ,
"type" : "n8n-nodes-base.set" ,
"typeVersion" : 1 ,
"position" : [
480 ,
840
]
} ,
{
"parameters" : {
"mode" : "removeKeyMatches" ,
"propertyName1" : "count" ,
"propertyName2" : "count"
} ,
"name" : "Merge4" ,
"type" : "n8n-nodes-base.merge" ,
"typeVersion" : 1 ,
"position" : [
780 ,
860
]
} ,
{
"parameters" : {
"operation" : "update" ,
"docId" : "tAuWNMisjXqyEkYudRcA2c" ,
"tableId" : "Classrooms" ,
"rowId" : "2" ,
"fieldsToSend" : {
"properties" : [
{
"fieldId" : "count" ,
"fieldValue" : "={{$json[\"count\"]}}"
}
]
}
} ,
"name" : "rokoss4" ,
"type" : "n8n-nodes-base.grist" ,
"typeVersion" : 1 ,
"position" : [
1020 ,
1020
] ,
"credentials" : {
"gristApi" : {
"id" : "21" ,
"name" : "Grist account"
}
}
} ,
{
"parameters" : {
"values" : {
"number" : [
{
"name" : "recount" ,
"value" : "={{22 - $json[\"count\"]}}"
}
]
} ,
"options" : { }
} ,
"name" : "recount rokoss1" ,
"type" : "n8n-nodes-base.set" ,
"typeVersion" : 1 ,
"position" : [
1020 ,
860
]
} ,
{
"parameters" : {
"docId" : "tAuWNMisjXqyEkYudRcA2c" ,
"tableId" : "Classrooms" ,
"returnAll" : true ,
"additionalOptions" : {
"filter" : {
"filterProperties" : [
{
"field" : "address" ,
"values" : "Красносільського 59а "
}
]
}
}
} ,
"name" : "masani1" ,
"type" : "n8n-nodes-base.grist" ,
"typeVersion" : 1 ,
"position" : [
480 ,
1000
] ,
"credentials" : {
"gristApi" : {
"id" : "21" ,
"name" : "Grist account"
}
}
} ,
{
"parameters" : {
"graphApiVersion" : "v13.0" ,
"node" : "me" ,
"edge" : "accounts" ,
"options" : { }
} ,
"name" : "Get Pages1" ,
"type" : "n8n-nodes-base.facebookGraphApi" ,
"typeVersion" : 1 ,
"position" : [
160 ,
280
] ,
"credentials" : {
"facebookGraphApi" : {
"id" : "36" ,
"name" : "Facebook Graph account"
}
}
} ,
{
"parameters" : {
"fieldToSplitOut" : "data" ,
"options" : { }
} ,
"name" : "Split Pages1" ,
"type" : "n8n-nodes-base.itemLists" ,
"typeVersion" : 1 ,
"position" : [
400 ,
280
]
} ,
{
"parameters" : {
"conditions" : {
"string" : [
{
"value1" : "={{$json[\"id\"]}}" ,
"value2" : "105101524930750"
}
]
}
} ,
"name" : "Is Tom Travels?1" ,
"type" : "n8n-nodes-base.if" ,
"typeVersion" : 1 ,
"position" : [
620 ,
280
]
} ,
{
"parameters" : {
"httpRequestMethod" : "POST" ,
"graphApiVersion" : "v13.0" ,
"node" : "=336184934610406" ,
"edge" : "events" ,
"options" : {
"queryParametersJson" : "{\n \"description\": \"Запис на навчання за адресою\\nм. Чернігів Проспект Перемоги 39\",\n \"end_time\": \"2022-07-20T09:15:00+0300\",\n \"name\": \"Найближча дата почтатку занять\",\n \"place\": {\n \"name\": \"м. Чернігів Проспект Перемоги 39\"\n },\n \"start_time\": \"2022-07-20T09:00:00+0300\",\n \"id\": \"336184934610406\"\n },"
}
} ,
"name" : "Facebook Graph API3" ,
"type" : "n8n-nodes-base.facebookGraphApi" ,
"typeVersion" : 1 ,
"position" : [
1020 ,
2022-06-19 21:00:54 +00:00
280
] ,
"credentials" : {
"facebookGraphApi" : {
"id" : "36" ,
"name" : "Facebook Graph account"
}
}
}
] ,
"connections" : {
2022-06-21 21:00:40 +00:00
"Facebook Graph API" : {
"main" : [
[
{
"node" : "Facebook Graph API1" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"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
}
]
]
} ,
"HTTP Request2" : {
"main" : [
[
{
"node" : "HTML Extract1" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"HTML Extract1" : {
"main" : [
[
{
"node" : "Set2" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"Set2" : {
"main" : [
[
{
"node" : "Merge3" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"HTTP Request3" : {
"main" : [
[
{
"node" : "HTML Extract" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"HTTP Request4" : {
"main" : [
[
{
"node" : "HTML Extract3" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"HTML Extract3" : {
"main" : [
[
{
"node" : "Set4" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"Set4" : {
"main" : [
[
{
"node" : "prospect" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"Cron" : {
"main" : [
[
{
"node" : "HTTP Request2" ,
"type" : "main" ,
"index" : 0
} ,
{
"node" : "HTTP Request3" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"Merge3" : {
"main" : [
[
{
"node" : "rokoss2" ,
"type" : "main" ,
"index" : 0
} ,
{
"node" : "recount rokoss" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"rokoss1" : {
"main" : [
[
{
"node" : "Merge3" ,
"type" : "main" ,
"index" : 1
}
]
]
} ,
"recount rokoss" : {
2022-06-19 21:00:54 +00:00
"main" : [
[
{
"node" : "Get Pages" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
2022-06-21 21:00:40 +00:00
"HTML Extract" : {
2022-06-19 21:00:54 +00:00
"main" : [
[
{
2022-06-21 21:00:40 +00:00
"node" : "Set" ,
2022-06-19 21:00:54 +00:00
"type" : "main" ,
"index" : 0
}
]
]
} ,
2022-06-21 21:00:40 +00:00
"Set" : {
2022-06-19 21:00:54 +00:00
"main" : [
[
{
2022-06-21 21:00:40 +00:00
"node" : "Merge4" ,
2022-06-19 21:00:54 +00:00
"type" : "main" ,
"index" : 0
}
]
]
} ,
2022-06-21 21:00:40 +00:00
"Merge4" : {
2022-06-19 21:00:54 +00:00
"main" : [
[
{
2022-06-21 21:00:40 +00:00
"node" : "rokoss4" ,
"type" : "main" ,
"index" : 0
} ,
{
"node" : "recount rokoss1" ,
2022-06-19 21:00:54 +00:00
"type" : "main" ,
"index" : 0
}
]
]
} ,
2022-06-21 21:00:40 +00:00
"masani1" : {
2022-06-19 21:00:54 +00:00
"main" : [
[
{
2022-06-21 21:00:40 +00:00
"node" : "Merge4" ,
"type" : "main" ,
"index" : 1
}
]
]
} ,
"Get Pages1" : {
"main" : [
[
{
"node" : "Split Pages1" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"Split Pages1" : {
"main" : [
[
{
"node" : "Is Tom Travels?1" ,
2022-06-19 21:00:54 +00:00
"type" : "main" ,
"index" : 0
}
]
]
2022-06-21 21:00:40 +00:00
} ,
"Is Tom Travels?1" : {
"main" : [
[
{
"node" : "Facebook Graph API3" ,
"type" : "main" ,
"index" : 0
}
]
]
} ,
"Start" : {
"main" : [
[ ]
]
2022-06-19 21:00:54 +00:00
}
} ,
"createdAt" : "2022-06-18T21:12:12.483Z" ,
2022-06-21 21:00:40 +00:00
"updatedAt" : "2022-06-21T09:50:10.844Z" ,
"settings" : {
"errorWorkflow" : "25"
} ,
2022-06-19 21:00:54 +00:00
"staticData" : null ,
"tags" : [
{
"id" : "1" ,
"name" : "avtomoto25" ,
"createdAt" : "2022-05-10T18:06:30.022Z" ,
"updatedAt" : "2022-05-10T18:06:30.022Z"
}
]
}