first commit
This commit is contained in:
457
flows/14.json
Normal file
457
flows/14.json
Normal file
@@ -0,0 +1,457 @@
|
||||
{
|
||||
"id": 14,
|
||||
"name": "avtmoto_cf",
|
||||
"active": true,
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"name": "Start",
|
||||
"type": "n8n-nodes-base.start",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-420,
|
||||
640
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "ea62db5f-f87b-48cb-9b12-e6cf7810324b",
|
||||
"options": {}
|
||||
},
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-880,
|
||||
-40
|
||||
],
|
||||
"webhookId": "ea62db5f-f87b-48cb-9b12-e6cf7810324b"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"chatId": "-1001369967688",
|
||||
"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-source\"]}}",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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
|
||||
]
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"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\"]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "Записываем пользователя в таблицу",
|
||||
"type": "n8n-nodes-base.grist",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-100,
|
||||
-40
|
||||
],
|
||||
"credentials": {
|
||||
"gristApi": {
|
||||
"id": "21",
|
||||
"name": "Grist account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "date",
|
||||
"value": "={{$now.toString()}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"name": "Set",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-620,
|
||||
-40
|
||||
]
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"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
|
||||
]
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"createdAt": "2022-04-30T16:57:58.523Z",
|
||||
"updatedAt": "2022-05-23T13:54:25.915Z",
|
||||
"settings": {},
|
||||
"staticData": null
|
||||
}
|
||||
Reference in New Issue
Block a user