173 lines
3.9 KiB
JSON
Executable File
173 lines
3.9 KiB
JSON
Executable File
{
|
||
"createdAt": "2022-04-20T08:33:49.423Z",
|
||
"updatedAt": "2022-12-27T16:02:49.268Z",
|
||
"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"
|
||
}
|
||
},
|
||
"id": "7c2e941a-1cb2-4092-b1b2-b3c5bf84532a"
|
||
},
|
||
{
|
||
"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"
|
||
}
|
||
},
|
||
"id": "4ac6e4b3-22a2-4396-84a8-cd03bf3c221b"
|
||
},
|
||
{
|
||
"parameters": {},
|
||
"name": "Start",
|
||
"type": "n8n-nodes-base.start",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
240,
|
||
300
|
||
],
|
||
"id": "1969d781-74dd-436a-b4f9-b43fb276505f"
|
||
},
|
||
{
|
||
"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"
|
||
}
|
||
},
|
||
"id": "168ba159-d725-47ce-997a-25014c7e53c6"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"conditions": {
|
||
"string": [
|
||
{
|
||
"value1": "={{$json[\"message\"][\"text\"]}}",
|
||
"value2": "/weather"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"name": "IF",
|
||
"type": "n8n-nodes-base.if",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
380,
|
||
80
|
||
],
|
||
"id": "31a0e5d9-607c-4371-8ca6-855ee7cf536c"
|
||
},
|
||
{
|
||
"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"
|
||
}
|
||
},
|
||
"id": "60bdeb82-fe16-45c5-ab71-325343dba060"
|
||
}
|
||
],
|
||
"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
|
||
}
|
||
]
|
||
]
|
||
}
|
||
},
|
||
"settings": {},
|
||
"staticData": null,
|
||
"dataLoaded": true,
|
||
"pinData": null,
|
||
"versionId": "b6c332ad-7437-43d5-a55a-4787a3589e01",
|
||
"triggerCount": 1,
|
||
"tags": []
|
||
} |