first commit
This commit is contained in:
162
flows/1.json
Normal file
162
flows/1.json
Normal file
@@ -0,0 +1,162 @@
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Bot to Get Weather Forecast (Telegram)",
|
||||
"active": true,
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"cityName": "chernihiv,ua",
|
||||
"language": "ru"
|
||||
},
|
||||
"name": "OpenWeatherMap",
|
||||
"type": "n8n-nodes-base.openWeatherMap",
|
||||
"position": [
|
||||
660,
|
||||
80
|
||||
],
|
||||
"typeVersion": 1,
|
||||
"credentials": {
|
||||
"openWeatherMapApi": {
|
||||
"id": "2",
|
||||
"name": "OpenWeatherMap account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"chatId": "={{$node[\"Telegram_Trigger\"].json[\"message\"][\"chat\"][\"id\"]}}",
|
||||
"text": "=Прямо сейчас, у нас {{$node[\"OpenWeatherMap\"].json[\"weather\"][0][\"description\"]}}. Температура {{$node[\"OpenWeatherMap\"].json[\"main\"][\"temp\"]}}°C но на самом деле ощущается как {{$node[\"OpenWeatherMap\"].json[\"main\"][\"feels_like\"]}}°C 🙂",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"name": "Telegram",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
900,
|
||||
80
|
||||
],
|
||||
"typeVersion": 1,
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "1",
|
||||
"name": "Che weather bot"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"name": "Start",
|
||||
"type": "n8n-nodes-base.start",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
240,
|
||||
300
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"message"
|
||||
],
|
||||
"additionalFields": {}
|
||||
},
|
||||
"name": "Telegram_Trigger",
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"position": [
|
||||
160,
|
||||
80
|
||||
],
|
||||
"typeVersion": 1,
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "1",
|
||||
"name": "Che weather bot"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{$json[\"message\"][\"text\"]}}",
|
||||
"value2": "/weather"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "IF",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
380,
|
||||
80
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"chatId": "={{$node[\"Telegram_Trigger\"].json[\"message\"][\"chat\"][\"id\"]}}",
|
||||
"text": "=Я вас не понимаю :-)",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"name": "Telegram1",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
820,
|
||||
300
|
||||
],
|
||||
"typeVersion": 1,
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "1",
|
||||
"name": "Che weather bot"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"OpenWeatherMap": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Telegram_Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "IF",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"IF": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenWeatherMap",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Telegram1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"createdAt": "2022-04-20T08:33:49.423Z",
|
||||
"updatedAt": "2022-04-25T09:35:39.296Z",
|
||||
"settings": {},
|
||||
"staticData": null
|
||||
}
|
||||
Reference in New Issue
Block a user