Files
n8n/flows/1.json

163 lines
3.4 KiB
JSON
Raw Normal View History

2022-05-26 20:57:30 +03:00
{
"id": 1,
"name": "Bot to Get Weather Forecast (Telegram)",
2022-06-01 21:00:37 +00:00
"active": true,
2022-05-26 20:57:30 +03:00
"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",
2022-06-21 21:00:40 +00:00
"updatedAt": "2022-06-21T03:17:43.768Z",
2022-05-26 20:57:30 +03:00
"settings": {},
2022-06-09 21:00:39 +00:00
"staticData": null,
"tags": []
2022-05-26 20:57:30 +03:00
}