Files
n8n/flows/11.json

170 lines
5.2 KiB
JSON
Executable File

{
"id": 11,
"name": "avtomoto25",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-800,
1100
]
},
{
"parameters": {
"path": "scool",
"responseMode": "responseNode",
"options": {}
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
-800,
1280
],
"webhookId": "42d23674-abe0-4cb4-a158-3319140d97f0"
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"returnAll": true,
"additionalOptions": {}
},
"name": "Grist",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
-500,
1280
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"operation": "aggregateItems",
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "id"
},
{
"fieldToAggregate": "date_ru"
},
{
"fieldToAggregate": "date_ua"
},
{
"fieldToAggregate": "count"
},
{
"fieldToAggregate": "time"
},
{
"fieldToAggregate": "day_2_ua"
},
{
"fieldToAggregate": "day_1_ua"
},
{
"fieldToAggregate": "day_1_ru"
},
{
"fieldToAggregate": "day_2_ru"
},
{
"fieldToAggregate": "address"
},
{
"fieldToAggregate": "time_2"
}
]
},
"options": {}
},
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
-280,
1280
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={ \"data\": \n { \"data_rokoss\":\n {\n \"ru\": \"{{$json[\"date_ru\"][0]}}\",\n \"ua\": \"{{$json[\"date_ua\"][0]}}\"\n },\n \n \"data_masani\":\n {\n \"ru\": \"{{$json[\"date_ru\"][1]}}\",\n \"ua\": \"{{$json[\"date_ua\"][1]}}\"\n },\n \"data_prospect\":\n {\n \"ru\": \"{{$json[\"date_ru\"][2]}}\",\n \"ua\": \"{{$json[\"date_ua\"][2]}}\"\n } \n },\n \"count\":\n {\n \"rokoss\": \"{{$json[\"count\"][0]}}\",\n \"masani\": \"{{$json[\"count\"][1]}}\",\n \"prospect\": \"{{$json[\"count\"][2]}}\"\n },\n\n\"schedule\":\n {\n \"rokoss\":\n {\n \"day1\":\n {\n \"ru\": \"{{$json[\"day_1_ru\"][0]}}\",\n \"ua\": \"{{$json[\"day_1_ua\"][0]}}\"\n },\n \"day2\":\n {\n \"ru\": \"{{$json[\"day_2_ru\"][0]}}\",\n \"ua\": \"{{$json[\"day_2_ua\"][0]}}\"\n },\n \"time\": \"{{$json[\"time\"][0]}}\",\n \"time_2\": \"{{$json[\"time_2\"][0]}}\"\n },\n\"masani\":\n{\n\"day1\":\n{\n\"ru\": \"{{$json[\"day_1_ru\"][1]}}\",\n\"ua\": \"{{$json[\"day_1_ua\"][1]}}\"\n},\n\"day2\":\n{\n\"ru\": \"{{$json[\"day_2_ru\"][1]}}\",\n\"ua\": \"{{$json[\"day_2_ua\"][1]}}\"\n},\n\"time\": \"{{$json[\"time\"][1]}}\"\n},\n\"prospect\":\n{\n\"day1\":\n{\n\"ru\": \"{{$json[\"day_1_ru\"][2]}}\",\n\"ua\": \"{{$json[\"day_1_ua\"][2]}}\"\n},\n\"day2\":\n{\n\"ru\": \"{{$json[\"day_2_ru\"][2]}}\",\n\"ua\": \"{{$json[\"day_2_ua\"][2]}}\"\n},\n\"time\": \"{{$json[\"time\"][2]}}\"\n}\n}\n}",
"options": {
"responseCode": 200
}
},
"name": "Respond to Webhook2",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
-40,
1280
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Grist",
"type": "main",
"index": 0
}
]
]
},
"Grist": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"Item Lists": {
"main": [
[
{
"node": "Respond to Webhook2",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-04-29T07:24:59.929Z",
"updatedAt": "2022-07-12T11:51:32.916Z",
"settings": {
"saveExecutionProgress": "DEFAULT",
"errorWorkflow": "25"
},
"staticData": null,
"pinData": null,
"tags": [
{
"id": "1",
"name": "avtomoto25",
"createdAt": "2022-05-10T18:06:30.022Z",
"updatedAt": "2022-05-10T18:06:30.022Z"
}
]
}