Post daily weather-based X updates with OpenWeatherMap, OpenAI, and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs on a schedule (every day at 07:00). Along the way it connects OpenAI Chat Model, X (Formerly Twitter) and Google Sheets.
How it runs
Trigger: On a schedule (every day at 07:00).
- Check Today's Weather (OpenWeatherMap): uses OpenWeatherMap
- Classify Weather Bucket (Code): runs custom JavaScript code
- Route By Weather (Switch): routes items into 3 branches
- ☔ Rainy Day Angle (Edit Fields (Set)): sets 1 field: angle
- 🥵 Hot Day Angle (Edit Fields (Set)): sets 1 field: angle
- 🥶 Cold Day Angle (Edit Fields (Set)): sets 1 field: angle
- 😊 Pleasant Day Angle (Edit Fields (Set)): sets 1 field: angle
- Write Today's Post (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- Publish On X (X (Formerly Twitter)): uses X (Formerly Twitter)
- Log Published Post (Google Sheets): append
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - OpenWeatherMap
n8n-nodes-base.openWeatherMap - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - X (Formerly Twitter)
n8n-nodes-base.twitter - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow runs daily at 07:00, pulls current weather from OpenWeatherMap, uses OpenAI to generate a weather-matched post, publishes it to X (Twitter), and logs the weather, bucket, and post text to Google Sheets. How it works 1. Runs every…