Post daily weather-based X updates with OpenWeatherMap, OpenAI, and Google Sheets

Go to Workflow
0 views
Built by kenta kenta
Created on October 06, 2026

Description

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
Runs every day at 07:00 on a schedule.
Fetches the current weather for the configured city from OpenWeatherMap.
Converts the temperature to Celsius and classifies conditions into a marketing bucket (rain, hot, cold, or pleasant).
Selects the corresponding campaign angle text for the identified weather bucket.
Sends the weather details and selected angle to an OpenAI chat model to write a single social post (max 260 characters) following the specified style rules.
Publishes the generated post to X (Twitter) and appends the date, weather, temperature, bucket, and post text to Google Sheets.

Setup
Add credentials for OpenWeatherMap, OpenAI, X (Twitter), and Google Sheets.
Set the target city in the OpenWeatherMap step.
Customize the four campaign angle texts (rain, hot, cold, pleasant) to match your products and offers.
Select the Google Sheets document and sheet name to append to, and ensure it has columns for date, weather, temp, bucket, and post.

Nodes Used (6)

Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
OpenWeatherMap
n8n-nodes-base.openWeatherMap
X (Formerly Twitter)
n8n-nodes-base.twitter