Files
n8n/flows/35.json

679 lines
13 KiB
JSON
Raw Normal View History

2022-06-18 21:00:54 +00:00
{
"id": 35,
2022-06-21 21:00:40 +00:00
"name": "avtomoto25 review",
"active": true,
2022-06-18 21:00:54 +00:00
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
2022-06-21 21:00:40 +00:00
-480,
440
2022-06-18 21:00:54 +00:00
]
},
{
"parameters": {
"url": "https://avtomoto25.cn.ua",
"responseFormat": "string",
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
2022-06-21 21:00:40 +00:00
260,
2022-06-18 21:00:54 +00:00
300
]
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "review",
"cssSelector": "tr",
"returnValue": "html",
"returnArray": true
}
]
},
"options": {
"trimValues": false
}
},
"name": "HTML Extract",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
2022-06-21 21:00:40 +00:00
520,
2022-06-18 21:00:54 +00:00
300
]
},
{
"parameters": {
"fieldToSplitOut": "review",
"options": {}
},
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
2022-06-21 21:00:40 +00:00
760,
2022-06-18 21:00:54 +00:00
300
]
},
{
"parameters": {
"dataPropertyName": "review",
"extractionValues": {
"values": [
{
"key": "title",
"cssSelector": "div.mrp.name"
},
{
"key": "link",
"cssSelector": "a.post-permalink",
"returnValue": "attribute",
"attribute": "href"
},
{
"key": "content",
"cssSelector": "div.mrp-comment.mrp"
2022-06-21 21:00:40 +00:00
},
{
"key": "date",
"cssSelector": "div.entry-date.mrp"
2022-06-18 21:00:54 +00:00
}
]
},
"options": {}
},
"name": "HTML Extract1",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
2022-06-21 21:00:40 +00:00
980,
2022-06-18 21:00:54 +00:00
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"title\"]}}",
"operation": "isNotEmpty"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
2022-06-21 21:00:40 +00:00
1180,
300
]
},
{
"parameters": {
"node": "Avtomoto25",
"options": {
"fields": {
"field": [
{
"name": "access_token"
}
]
}
}
},
"name": "Facebook Graph API",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
1220,
780
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"httpRequestMethod": "POST",
"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": [
1440,
780
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"graphApiVersion": "v13.0",
"node": "me",
"edge": "accounts",
"options": {}
},
"name": "Get Pages",
"type": "n8n-nodes-base.facebookGraphApi",
"typeVersion": 1,
"position": [
220,
740
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
}
},
{
"parameters": {
"fieldToSplitOut": "data",
"options": {}
},
"name": "Split Pages",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
500,
740
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"id\"]}}",
"value2": "105101524930750"
}
]
}
},
"name": "Is Tom Travels?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
740,
740
]
},
{
"parameters": {
"httpRequestMethod": "POST",
"node": "={{$json[\"id\"]}}",
"edge": "feed",
"options": {
"queryParameters": {
"parameter": [
{
"name": "message",
"value": "Розпочато запис на навчання за адресою: м. Чернігів вул. Рокосовського 51 Початок занятть: 20 липня 2022 року"
},
{
"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": [
960,
740
],
"credentials": {
"facebookGraphApi": {
"id": "36",
"name": "Facebook Graph account"
}
},
"disabled": true
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"additionalOptions": {}
},
"name": "rokoss1",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
220,
900
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 10,
"unit": "minutes"
}
]
}
},
"name": "Cron1",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
-60,
900
],
"disabled": true
},
{
"parameters": {
"value1": "={{$json[\"id\"]}}",
"rules": {
"rules": [
{
"operation": "equal",
"value2": 1
},
{
"operation": "equal",
"value2": 2,
"output": 1
},
{
"operation": "equal",
"value2": 3,
"output": 2
}
]
},
"fallbackOutput": 3
},
"name": "Switch",
"type": "n8n-nodes-base.switch",
"typeVersion": 1,
"position": [
440,
900
]
},
{
"parameters": {
"mode": "removeKeyMatches",
"propertyName1": "count",
"propertyName2": "count"
},
"name": "Merge1",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
860,
960
]
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Classrooms",
"returnAll": true,
"additionalOptions": {
"filter": {
"filterProperties": [
{
"field": "address",
"values": "вул. Рокосовського 51"
}
]
}
}
},
"name": "rokoss2",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
440,
1100
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"mode": "removeKeyMatches",
"propertyName1": "content",
"propertyName2": "content"
},
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
1460,
300
]
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Reviews",
"additionalOptions": {}
},
"name": "rokoss5",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
1680,
560
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Reviews",
"returnAll": true,
"additionalOptions": {}
},
"name": "review",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
1180,
500
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"operation": "create",
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Reviews",
"dataToSend": "autoMapInputs"
},
"name": "review1",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
1680,
300
],
"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": [
-40,
2022-06-18 21:00:54 +00:00
300
]
}
],
"connections": {
"HTTP Request": {
"main": [
[
{
"node": "HTML Extract",
"type": "main",
"index": 0
}
]
]
},
"HTML Extract": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"Item Lists": {
"main": [
[
{
"node": "HTML Extract1",
"type": "main",
"index": 0
}
]
]
},
"HTML Extract1": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
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
}
]
]
},
"Cron1": {
"main": [
[
{
"node": "rokoss1",
"type": "main",
"index": 0
}
]
]
},
"rokoss1": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"rokoss2": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "review1",
"type": "main",
"index": 0
}
]
]
},
"review": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Cron": {
2022-06-18 21:00:54 +00:00
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-06-18T18:03:07.218Z",
2022-06-21 21:00:40 +00:00
"updatedAt": "2022-06-21T07:23:53.224Z",
2022-06-18 21:00:54 +00:00
"settings": {
"errorWorkflow": "25"
},
"staticData": null,
2022-07-20 21:00:15 +00:00
"pinData": null,
2022-06-18 21:00:54 +00:00
"tags": [
{
"id": "1",
"name": "avtomoto25",
"createdAt": "2022-05-10T18:06:30.022Z",
"updatedAt": "2022-05-10T18:06:30.022Z"
}
]
}