Files
n8n/flows/28.json

348 lines
7.1 KiB
JSON
Executable File

{
"createdAt": "2022-05-30T05:02:38.795Z",
"updatedAt": "2022-12-23T17:42:33.065Z",
"id": 28,
"name": "curency",
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-140,
300
],
"id": "2f0ccd96-cdd7-4ed8-a7d6-b2beb033b89d"
},
{
"parameters": {
"url": "https://minfin.com.ua/currency/auction/usd/buy/chernigov/",
"responseFormat": "string",
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
60,
300
],
"id": "fb3694ae-78af-42f0-a731-28323ef9764b"
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "buy",
"cssSelector": "div.buy > span.Typography.cardHeadlineL ",
"returnValue": "html"
},
{
"key": "sale",
"cssSelector": "div.sale > span.Typography.cardHeadlineL",
"returnValue": "html"
}
]
},
"options": {}
},
"name": "HTML Extract",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
260,
300
],
"id": "47b66f11-b394-4106-91ab-a52d8f566211"
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"number": [
{
"name": "sale_usd",
"value": "={{$json[\"sale\"].substr(0,5)}}"
},
{
"name": "buy_usd",
"value": "={{$json[\"buy\"].substr(0,5)}}"
}
],
"string": [
{
"name": "date",
"value": "={{$now.toString()}}"
}
]
},
"options": {
"dotNotation": false
}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
440,
300
],
"id": "70d97d3d-2c60-4be7-b929-e7deecfd0288"
},
{
"parameters": {
"operation": "create",
"docId": "uRdJbcjhbMVmAJ3vyegxhE",
"tableId": "USD",
"dataToSend": "autoMapInputs"
},
"name": "Grist",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
880,
380
],
"id": "45bc0bd4-2f33-4296-ac7d-d80873bd8608",
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 4
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
-140,
480
],
"id": "096dbf21-146e-4c8d-81d2-5401089a766d"
},
{
"parameters": {
"url": "https://minfin.com.ua/currency/auction/eur/buy/chernigov/",
"responseFormat": "string",
"options": {}
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 2,
"position": [
60,
480
],
"id": "389dc81c-d913-45c1-938b-8a886d972fab"
},
{
"parameters": {
"extractionValues": {
"values": [
{
"key": "buy",
"cssSelector": "div.buy > span.Typography.cardHeadlineL ",
"returnValue": "html"
},
{
"key": "sale",
"cssSelector": "div.sale > span.Typography.cardHeadlineL",
"returnValue": "html"
}
]
},
"options": {}
},
"name": "HTML Extract1",
"type": "n8n-nodes-base.htmlExtract",
"typeVersion": 1,
"position": [
260,
480
],
"id": "fd6feab0-d74f-4d46-8039-e38399dc5cf8"
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"number": [
{
"name": "sale_eur",
"value": "={{$json[\"sale\"].substr(0,5)}}"
},
{
"name": "buy_eur",
"value": "={{$json[\"buy\"].substr(0,5)}}"
}
],
"string": [
{
"name": "date",
"value": "={{$now.toString()}}"
}
]
},
"options": {
"dotNotation": false
}
},
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
440,
480
],
"id": "8959670b-30e3-4a29-a5c2-5e69898af45e"
},
{
"parameters": {
"mode": "mergeByIndex",
"join": "outer"
},
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
660,
380
],
"id": "9061909f-3128-408d-9aba-a6dce5c6e64e"
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "HTML Extract",
"type": "main",
"index": 0
}
]
]
},
"HTML Extract": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Cron": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
},
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"HTML Extract1": {
"main": [
[
{
"node": "Set1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "HTML Extract1",
"type": "main",
"index": 0
}
]
]
},
"Set1": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Grist",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {},
"staticData": null,
"dataLoaded": true,
"pinData": {},
"versionId": "fe7f7772-6e22-4343-bd70-cb75cbe76e7e",
"triggerCount": 1,
"tags": [
{
"createdAt": "2022-05-19T09:37:15.931Z",
"updatedAt": "2022-05-19T09:37:15.931Z",
"id": "2",
"name": "my"
}
]
}