Envoi de rapports météo quotidiens via un bot Telegram et OpenWeatherMap
Ceci est unPersonal Productivity, Miscellaneous, Multimodal AIworkflow d'automatisation du domainecontenant 10 nœuds.Utilise principalement des nœuds comme Cron, Function, Telegram, OpenWeatherMap. Bulletin météo quotidien : OpenWeatherMap et un robot Telegram
- •Token Bot Telegram
Nœuds utilisés (10)
{
"id": "zVk8lAovJaOKMXFR",
"meta": {
"instanceId": "ade915387b18f7a3b9a14fd8fb677fdbace0ade794de7914e8790d907cd285d0"
},
"name": "Daily Weather Reports with OpenWeatherMap and Telegram Bot",
"tags": [],
"nodes": [
{
"id": "b707258f-7424-4199-887b-20cd21728102",
"name": "Vue d'ensemble du workflow",
"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": "Déclencheur programmé",
"type": "n8n-nodes-base.cron",
"position": [
-624,
64
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1de1ccc6-b87a-4af6-bc11-0903dc740edd",
"name": "Configuration de la planification",
"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": "Obtenir la météo",
"type": "n8n-nodes-base.openWeatherMap",
"position": [
-400,
64
],
"parameters": {
"cityName": "Kielce,PL",
"language": "en"
},
"typeVersion": 1
},
{
"id": "8aed3c70-bc04-4a27-8d1b-46ae41a38bbf",
"name": "Données météo 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": "Formater la météo",
"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": "Formatage du message",
"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": "Envoyer un SMS",
"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": "Livraison 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": "Guide de démarrage rapide",
"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
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire - Productivité personnelle, Divers, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Dariusz Koryto
@dakoPartager ce workflow