π± Post daily weather-based X updates with OpenWeatherMap, OpenAI, and Google Sheets
β‘ 0 views Β· π± Social Media & Email Marketing
π‘ Pro Tip β Twitterβs API is paid now, which makes simple data pulls expensive. ScraperNode is a community node that scrapes Twitter profiles and posts without needing API access.
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
Google Sheets, OpenWeatherMap, X (Formerly Twitter), Schedule Trigger, Basic LLM Chain, OpenAI Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File