OpenWeatherMap と Telegram ボットを使って毎日の天気レポートを送信する
中級
これはPersonal Productivity, Miscellaneous, Multimodal AI分野の自動化ワークフローで、10個のノードを含みます。主にCron, Function, Telegram, OpenWeatherMapなどのノードを使用。 毎日の天気レポート:OpenWeatherMap と Telegram ボット
前提条件
- •Telegram Bot Token
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "zVk8lAovJaOKMXFR",
"meta": {
"instanceId": "ade915387b18f7a3b9a14fd8fb677fdbace0ade794de7914e8790d907cd285d0"
},
"name": "Daily Weather Reports with OpenWeatherMap and Telegram Bot",
"tags": [],
"nodes": [
{
"id": "b707258f-7424-4199-887b-20cd21728102",
"name": "ワークフロー概要",
"type": "n8n-nodes-base.stickyNote",
"position": [
-832,
-352
],
"parameters": {
"width": 300,
"height": 392,
"content": "## 🤖 Automated Weather Bot\n\n**This workflow:**\n1. Triggers on schedule (daily)\n2. Fetches weather from OpenWeatherMap\n3. Formats data with emojis\n4. Sends to Telegram chat\n\n**Setup needed:**\n- OpenWeatherMap API key\n- Telegram bot token\n- Your chat ID"
},
"typeVersion": 1
},
{
"id": "f55bdbef-30ef-4759-815c-8168bbb0d6b8",
"name": "スケジュールトリガー",
"type": "n8n-nodes-base.cron",
"position": [
-624,
64
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1de1ccc6-b87a-4af6-bc11-0903dc740edd",
"name": "スケジュール設定",
"type": "n8n-nodes-base.stickyNote",
"position": [
-816,
224
],
"parameters": {
"width": 280,
"height": 296,
"content": "⏰ **SCHEDULE TRIGGER**\n\nSet when to send weather reports:\n- Default: 8:00 AM daily\n- Change cron: 0 8 * * *\n- Every 6h: 0 */6 * * *\n- Twice daily: 0 8,18 * * *"
},
"typeVersion": 1
},
{
"id": "954baa8c-530b-4bcc-bff9-00e841bdf7dd",
"name": "天気情報取得",
"type": "n8n-nodes-base.openWeatherMap",
"position": [
-400,
64
],
"parameters": {
"cityName": "Kielce,PL",
"language": "en"
},
"typeVersion": 1
},
{
"id": "8aed3c70-bc04-4a27-8d1b-46ae41a38bbf",
"name": "天気API",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
224
],
"parameters": {
"width": 248,
"height": 296,
"content": "🌤️ **WEATHER DATA**\n\n**Required:**\n- OpenWeatherMap credentials\n- Change city: \"YourCity,CountryCode\"\n- Language: en, es, fr, de, pl\n\n**Gets:** temp, humidity, wind, etc."
},
"typeVersion": 1
},
{
"id": "124a7ab9-52a1-4e4c-8735-787bb27083b5",
"name": "天気データ整形",
"type": "n8n-nodes-base.function",
"position": [
-176,
64
],
"parameters": {
"functionCode": "const weather = items[0].json;\n\nfunction formatTime(timestamp, timezoneOffset) {\n const date = new Date((timestamp + timezoneOffset) * 1000);\n return date.toISOString().substr(11, 5);\n}\n\nconst city = weather.name;\nconst temp = weather.main.temp.toFixed(1);\nconst tempMin = weather.main.temp_min.toFixed(1);\nconst tempMax = weather.main.temp_max.toFixed(1);\nconst feelsLike = weather.main.feels_like.toFixed(1);\nconst description = weather.weather[0].description;\nconst rain = weather.rain ? weather.rain[\"1h\"] : 0;\nconst windSpeed = weather.wind.speed.toFixed(1);\nconst windDeg = weather.wind.deg;\nconst clouds = weather.clouds.all;\nconst sunrise = formatTime(weather.sys.sunrise, weather.timezone);\nconst sunset = formatTime(weather.sys.sunset, weather.timezone);\n\nconst message = `Weather in ${city}:\n🌡 Temperature: ${temp}°C (feels like: ${feelsLike}°C)\n📉 Min: ${tempMin}°C, 📈 Max: ${tempMax}°C\n🌧 Precipitation: ${description}, ${rain} mm in the last hour\n💨 Wind: ${windSpeed} m/s, direction ${windDeg}°\n☁️ Cloudiness: ${clouds}%\n🌅 Sunrise: ${sunrise}\n🌇 Sunset: ${sunset}`;\n\nreturn [{ json: { message } }];"
},
"typeVersion": 1
},
{
"id": "86c09047-c113-40ca-a606-0225b8ad19f2",
"name": "メッセージフォーマット",
"type": "n8n-nodes-base.stickyNote",
"position": [
-224,
232
],
"parameters": {
"width": 200,
"height": 288,
"content": "📝 **FORMAT MESSAGE**\n\n**Converts raw data to:**\n- Human-readable text\n- Emojis for visual appeal\n- Organized layout\n- Local time zones\n\n**Customize:** Edit the message template in function code"
},
"typeVersion": 1
},
{
"id": "494899d5-16e9-44a4-acf9-190087e14bee",
"name": "テキストメッセージ送信",
"type": "n8n-nodes-base.telegram",
"position": [
64,
64
],
"webhookId": "a1a10685-f8eb-4b97-897f-3c9031e8de55",
"parameters": {
"text": "={{ $json.message }}",
"chatId": "XXXXXXX",
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "3c32825f-b4c7-4b52-938f-8a158be368aa",
"name": "Telegram配信",
"type": "n8n-nodes-base.stickyNote",
"position": [
16,
224
],
"parameters": {
"width": 200,
"height": 296,
"content": "📱 **SEND TO TELEGRAM**\n\n**Required setup:**\n1. Create bot via @BotFather\n2. Get bot token\n3. Get your chat ID\n4. Replace XXXXXXX with your chat ID\n\n**Result:** Weather report in your chat!"
},
"typeVersion": 1
},
{
"id": "98652765-0a26-42ea-8773-32431f9e7fbb",
"name": "クイックスタートガイド",
"type": "n8n-nodes-base.stickyNote",
"position": [
-352,
-336
],
"parameters": {
"width": 350,
"height": 340,
"content": "🚀 **QUICK START:**\n\n1. **Get OpenWeatherMap API key** (free at openweathermap.org)\n2. **Create Telegram bot** (message @BotFather)\n3. **Find your chat ID** (send message to bot, visit api URL)\n4. **Configure nodes** (add credentials, update chat ID)\n5. **Test workflow** (click test button)\n6. **Activate** (toggle switch ON)\n\n✅ Done! You'll get daily weather reports!"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "58aba6a0-c288-45c6-80c0-e1a9f66b21b7",
"connections": {
"954baa8c-530b-4bcc-bff9-00e841bdf7dd": {
"main": [
[
{
"node": "124a7ab9-52a1-4e4c-8735-787bb27083b5",
"type": "main",
"index": 0
}
]
]
},
"124a7ab9-52a1-4e4c-8735-787bb27083b5": {
"main": [
[
{
"node": "494899d5-16e9-44a4-acf9-190087e14bee",
"type": "main",
"index": 0
}
]
]
},
"f55bdbef-30ef-4759-815c-8168bbb0d6b8": {
"main": [
[
{
"node": "954baa8c-530b-4bcc-bff9-00e841bdf7dd",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
中級 - 個人の生産性, その他, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
アフォーム送信機+週次の感謝サマリー(ヘルス)v2
Notion、メール、Telegramを使って隔日の肯定メッセージと週次の感謝要約を送信
If
Set
Cron
+
If
Set
Cron
26 ノードShelly-Ann Davy
個人の生産性
Google DriveからFTPへのファイル転送とJSONログ記録およびレポートの自動化
Google DriveからFTPへのファイル転送を自動化し、JSONログ出力とレポートを生成
If
Ftp
Code
+
If
Ftp
Code
15 ノードDariusz Koryto
ファイル管理
TelegramとGoogle Sheetsを使った費用記録:週次サマリーと予算アラート
TelegramとGoogle Sheetsによる費用記録:週次サマリーと予算アラート
Code
Telegram
Google Sheets
+
Code
Telegram
Google Sheets
15 ノードGtaras
個人の生産性
ドイツのアパート検索ツールと自動申請(ノート付き)
自動ドイツ語アパート検索と申請:Immobilienscout24とGoogleサービスを統合
Set
Cron
Function
+
Set
Cron
Function
22 ノードAbbas Ali
個人の生産性
CoinGecko トップコイン
CoinGeckoから自動のに人気の暗号通貨更新情報をTelegramに送稿
Function
Telegram
Http Request
+
Function
Telegram
Http Request
6 ノードCryptooChai
仮想通貨取引
パントリー ソフトウェア在庫補充 — Notion → 買い物リスト + メール
Notion とメール通知を使った食品冷蔵庫在庫の自動管理
Set
Cron
Notion
+
Set
Cron
Notion
15 ノードShelly-Ann Davy
個人の生産性