Files
n8n/flows/14.json

490 lines
12 KiB
JSON
Raw Normal View History

2022-05-26 20:57:30 +03:00
{
2022-10-27 21:01:19 +00:00
"createdAt": "2022-04-30T16:57:58.523Z",
2022-12-22 22:00:50 +00:00
"updatedAt": "2022-12-22T19:13:23.989Z",
2022-05-26 20:57:30 +03:00
"id": 14,
2022-06-21 21:00:40 +00:00
"name": "avtmoto25 cf",
2022-05-26 20:57:30 +03:00
"active": true,
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-420,
640
2022-08-03 21:00:21 +00:00
],
"id": "06488dd8-f7bc-486f-87e2-15674e4a8ddb"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"httpMethod": "POST",
"path": "ea62db5f-f87b-48cb-9b12-e6cf7810324b",
"options": {}
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
-880,
-40
],
2022-08-03 21:00:21 +00:00
"webhookId": "ea62db5f-f87b-48cb-9b12-e6cf7810324b",
"id": "b3953002-65f1-476f-97ce-3328c4788f3e"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"chatId": "-1001369967688",
2022-05-30 21:01:02 +00:00
"text": "=🔔‌*Нова заявка на навчання*🔔\nІм'я: {{$json[\"body\"][\"your-name\"]}}\nemail: {{$json[\"body\"][\"your-email\"]}}\nКонтактний номер: {{$json[\"body\"][\"your-phone\"]}}\nХочу навчатися за адресою: {{$json[\"body\"][\"your-class\"]}}\nКатегорія: {{$json[\"body\"][\"your-category\"]}}\nДжерело інформації: {{$json[\"body\"][\"your-source\"]}}",
2022-05-26 20:57:30 +03:00
"replyMarkup": "inlineKeyboard",
"inlineKeyboard": {
"rows": [
{
"row": {
"buttons": [
{
"text": "Опрацьовано",
"additionalFields": {
"callback_data": "=accept-{{$json[\"date\"]}}"
}
},
{
"text": "Спам",
"additionalFields": {
"callback_data": "reject"
}
}
]
}
}
]
},
"additionalFields": {
"parse_mode": "Markdown"
}
},
"name": "Telegram",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
-100,
160
],
"credentials": {
"telegramApi": {
"id": "15",
"name": "avtomoto25"
}
2022-08-03 21:00:21 +00:00
},
"id": "0a053993-2975-4d1a-952b-ee61a43fdf0b"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"updates": [
"callback_query"
],
"additionalFields": {}
},
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1,
"position": [
-400,
380
],
"webhookId": "d6c9273d-aa32-4a5e-942b-ad92d38d6ecd",
"credentials": {
"telegramApi": {
"id": "15",
"name": "avtomoto25"
}
2022-08-03 21:00:21 +00:00
},
"id": "15ecb380-386d-4708-9c39-5cea8c861c16"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"dataType": "string",
"value1": "={{$json[\"callback_query\"][\"data\"]}}",
"rules": {
"rules": [
{
"operation": "contains",
"value2": "accept"
},
{
"value2": "reject",
"output": 1
}
]
}
},
"name": "Switch",
"type": "n8n-nodes-base.switch",
"typeVersion": 1,
"position": [
-140,
380
2022-08-03 21:00:21 +00:00
],
"id": "b7d4b8ce-bdc8-4f3c-9aa2-06449d565fd9"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"chatId": "-1001369967688",
"text": "=Користувача зараховано",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"name": "Telegram1",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
800,
420
],
"credentials": {
"telegramApi": {
"id": "15",
"name": "avtomoto25"
}
},
2022-08-03 21:00:21 +00:00
"disabled": true,
"id": "fa317967-65ed-4fbe-9a3b-c91d251eb98a"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"chatId": "-1001369967688",
"text": "=Заявку скасовано",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"name": "Telegram2",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1,
"position": [
220,
440
],
"credentials": {
"telegramApi": {
"id": "15",
"name": "avtomoto25"
}
2022-08-03 21:00:21 +00:00
},
"id": "0df34b87-5168-4a62-9690-17ec5ba24187"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"operation": "create",
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Registration",
"fieldsToSend": {
"properties": [
{
"fieldId": "=name",
"fieldValue": "=Ім'я: {{$json[\"body\"][\"your-name\"]}}\nemail: {{$json[\"body\"][\"your-email\"]}}\nКонтактний номер: {{$json[\"body\"][\"your-phone\"]}}\nХочу навчатися за адресою: {{$json[\"body\"][\"your-class\"]}}\nДжерело інформації: {{$json[\"body\"][\"your-source\"]}}\n\n{{$node[\"Webhook\"].paramet{{$node[\"Webhook\"].parameter[\"authentication\"]}}er[\"path\"]}}"
}
]
}
},
"name": "Grist",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
260,
660
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
},
2022-08-03 21:00:21 +00:00
"disabled": true,
"id": "d5cdc765-36d4-4927-aee2-0de5dce0ab73"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"operation": "sendTemplate",
"templateId": 3935065,
"additionalFields": {}
},
"name": "Mailjet",
"type": "n8n-nodes-base.mailjet",
"typeVersion": 1,
"position": [
240,
0
],
"credentials": {
"mailjetEmailApi": {
"id": "27",
"name": "Mailjet Email account"
}
},
2022-08-03 21:00:21 +00:00
"disabled": true,
"id": "47c66bf4-6ab7-4737-ad69-bf94b2ef6579"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"operation": "create",
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Registration",
"fieldsToSend": {
"properties": [
{
"fieldId": "name",
"fieldValue": "={{$json[\"body\"][\"your-name\"]}}"
},
{
"fieldId": "email",
"fieldValue": "={{$json[\"body\"][\"your-email\"]}}"
},
{
"fieldId": "phone",
"fieldValue": "={{$json[\"body\"][\"your-phone\"]}}"
},
{
"fieldId": "adress",
"fieldValue": "={{$json[\"body\"][\"your-class\"]}}"
},
{
"fieldId": "source",
"fieldValue": "={{$json[\"body\"][\"your-source\"]}}"
},
{
"fieldId": "id2",
"fieldValue": "={{$json[\"date\"]}}"
2022-05-30 21:01:02 +00:00
},
{
"fieldId": "categoty",
"fieldValue": "={{$json[\"body\"][\"your-category\"][0]}}"
2022-05-26 20:57:30 +03:00
}
]
}
},
"name": "Записываем пользователя в таблицу",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
-100,
-40
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-03 21:00:21 +00:00
},
"id": "57ae0863-cd5e-4f17-8ff8-95ac02e96448"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"values": {
"string": [
{
"name": "date",
"value": "={{$now.toString()}}"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
-620,
-40
2022-08-03 21:00:21 +00:00
],
"id": "5bd8b31d-77f3-4496-a9ca-27bd389987a6"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Registration",
"returnAll": true,
"additionalOptions": {}
},
"name": "ищем запись",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
220,
260
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-03 21:00:21 +00:00
},
"id": "d09f0c67-b0e4-4c38-9e5e-ca2663f42740"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"id2\"]}}",
"operation": "contains",
"value2": "={{$node[\"Telegram Trigger\"].json[\"callback_query\"][\"data\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
420,
260
2022-08-03 21:00:21 +00:00
],
"id": "9676a29f-fad7-4024-bdaa-09d58f47cfc2"
2022-05-26 20:57:30 +03:00
},
{
"parameters": {
"operation": "update",
"docId": "tAuWNMisjXqyEkYudRcA2c",
"tableId": "Registration",
"rowId": "={{$json[\"id\"]}}",
"fieldsToSend": {
"properties": [
{
"fieldId": "accepted",
"fieldValue": "true"
}
]
}
},
"name": "Grist1",
"type": "n8n-nodes-base.grist",
"typeVersion": 1,
"position": [
660,
200
],
"credentials": {
"gristApi": {
"id": "21",
"name": "Grist account"
}
2022-08-03 21:00:21 +00:00
},
"id": "1c05a9c3-7ec5-4926-ae13-9d98a9d5bdb4"
2022-05-26 20:57:30 +03:00
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Grist",
"type": "main",
"index": 0
},
{
"node": "ищем запись",
"type": "main",
"index": 0
}
],
[
{
"node": "Telegram2",
"type": "main",
"index": 0
}
]
]
},
"Записываем пользователя в таблицу": {
"main": [
[
{
"node": "Mailjet",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Записываем пользователя в таблицу",
"type": "main",
"index": 0
},
{
"node": "Telegram",
"type": "main",
"index": 0
}
]
]
},
"ищем запись": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Grist1",
"type": "main",
"index": 0
}
]
]
}
},
2022-07-31 21:00:30 +00:00
"settings": {
"saveExecutionProgress": "DEFAULT",
"errorWorkflow": "25"
},
2022-06-09 21:00:39 +00:00
"staticData": null,
2022-12-08 22:01:01 +00:00
"dataLoaded": true,
2022-07-20 21:00:15 +00:00
"pinData": null,
2022-12-07 22:01:07 +00:00
"versionId": "a00e06ec-bd4a-4955-a11d-764723bc5377",
2022-12-21 22:01:02 +00:00
"triggerCount": 2,
2022-06-09 21:00:39 +00:00
"tags": [
{
"createdAt": "2022-05-10T18:06:30.022Z",
2022-10-27 21:01:19 +00:00
"updatedAt": "2022-05-10T18:06:30.022Z",
"id": "1",
"name": "avtomoto25"
2022-06-09 21:00:39 +00:00
}
2022-12-07 22:01:07 +00:00
]
2022-05-26 20:57:30 +03:00
}