Automation of Weather-Based Sales and Staffing Decisions
Danielle Lazzara
AI Automation | Project 5
The Problem: Manual Weather Checks vs. Dynamic Demand
Bayside Brews & Scoops, a vibrant Miami establishment, faces daily operational challenges due to the city's unpredictable coastal weather. This directly impacts:
Product Demand Fluctuation
  • Hot vs. Iced Drinks: Rapid shifts in temperature dictate beverage preferences.
  • Gelato vs. Pastries: Demand for frozen treats surges on sunny days.
Unpredictable Foot Traffic
  • Locals vs. Tourists: Different segments respond uniquely to weather patterns.
  • Sunny vs. Cloudy Days: Direct correlation with customer volume.
Inefficient Staffing
  • Busy Mornings: High demand requires more hands.
  • Slow Days: Overstaffing leads to unnecessary costs.
The Current Pain Point
The manager's manual weather checks every morning result in delayed decisions, inconsistent preparation, and a high risk of under- or over-staffing. This lack of an automated daily overview hinders operational efficiency.
The business critically needs a consistent, automated, AI-powered morning briefing to proactively guide daily operations and optimize resource allocation.
The Solution: Automated AI-Powered Morning Briefing
I developed an automated workflow that delivers a comprehensive operational briefing every day at 7:00 AM, eliminating manual oversight and ensuring proactive decision-making.
Fetches Live Weather Data
Utilizes the OpenWeather API to retrieve real-time weather information, including temperature and detailed weather descriptions, ensuring accuracy and reliability verified through Postman.
Gemini AI Interpretation
Leverages Google's Gemini AI to interpret the raw weather data. The AI generates actionable insights for:
  • Optimal Product Focus
  • Strategic Staffing Guidance
  • Two Targeted Promotional Messages
Text Cleaning & Formatting
Employs a text formatter to refine the AI's output by removing extraneous characters such as brackets, quotes, and escape sequences, ensuring a polished and readable message.
Delivers Polished Morning Email
Automatically sends a well-formatted email to the manager, containing all the interpreted insights and recommendations. This ensures a reliable, data-driven daily operations plan is in place before the kiosk opens.
Workflow Diagram: A Seamless Automation Flow
This visual breakdown illustrates the daily automation process that streamlines Bayside Brews & Scoops' operations based on real-time weather data.
Daily 7:00 AM Automation Flow:
  • Schedule Trigger: Initiates the workflow precisely at 7:00 AM daily.
  • Webhook GET: Retrieves the most current Miami weather data from the OpenWeather API.
  • Gemini AI: Processes weather data to generate crucial operational insights.
  • Formatter: Cleans and refines the AI-generated text for clarity.
  • Gmail: Dispatches the final, formatted email briefing to the manager.
The entire process is designed to be fully automated, providing consistent, accurate, and timely operational guidance without manual intervention.
Behind the Screen: Inside the Automation Process
A step-by-step look at how the 7:00 AM AI-powered weather briefing email was automated, from API keys to the final email delivery.
1
Google AI Studio – API Key Creation
I generated a new API key in Google AI Studio for securely connecting Gemini to Zapier.
2
Zapier Authorization for Gemini
I connected Zapier to Gemini by pasting the newly created API key, ensuring seamless data flow.
3
OpenWeather API Keys Dashboard
I created and selected an active OpenWeather API key for retrieving real-time Miami weather data.
4
OpenWeather JSON Response in Browser
I tested the API URL directly in the browser to confirm that temperature and weather data returned correctly.
5
Postman – 200 OK Weather Request Test
I validated the API response with Postman, confirming a successful 200 OK status before building the Zap.
6
Zapier Step 1 – Schedule Trigger (7:00 AM Daily)
The automation workflow begins precisely at 7:00 AM every morning to deliver the briefing before business hours.
7
Zapier Step 2 – Webhooks GET (Weather Request)
Zapier retrieves Miami’s live weather by making a GET request to the OpenWeather API.
8
Zapier Step 3 – Gemini Prompt Setup
I passed the temperature and weather description into Gemini to generate product focus, staffing guidance, and promotional messages.
9
Formatter Steps – Remove Escape Characters
I used multiple Formatter steps to meticulously clean Gemini’s raw output, removing extraneous characters like quotes, brackets, and newlines.
10
Final Gmail Step – Assembled Email
The automation culminates by sending a polished morning email with all weather insights and AI-generated recommendations directly to the manager.
Workflow in Action: From AI Interpretation to Manager's Inbox
The key stages of the automation & demonstrating how raw data transforms into actionable insights and a clean, professional email.
1. Gemini AI Prompt Output
The AI receives temperature and weather descriptions, then returns a tailored product mix, staffing recommendations, and promotional messages.
2. Formatter & Prompt Clean-Up Step
This crucial step in removing any unwanted spaces from the prompt in order for Gemini AI to interpret the AI Output and ensures the AI's output is pristine by replacing unwanted characters like \n, brackets [ ], and quotes " with a blank space that could disrupt the email's readability.
3. Example of the Final Clean Email
"Good morning, Emily 👋 Weather: 79.56 °F, scattered clouds. Product Focus: Emphasize cold drinks & gelato. Staffing Guidance: Add one extra for morning shift. Promo 1: Refresh your day with an iced coffee! Promo 2: Cool off with gelato — perfect for scattered clouds!"
Comprehensive Benefits of AI-Driven Automation
This automation project delivers significant advantages across operational, business, and technical domains, driving efficiency and enhancing decision-making.
Operational Excellence
  • Accelerated morning preparation.
  • Precision in product stocking.
  • Optimal staffing alignment with expected traffic.
  • High-converting, weather-based promotions.
Tangible Business Impact
  • Eliminates human error in forecasting.
  • Ensures consistent management decisions.
  • Fosters proactive operational strategies.
  • Reduces waste by optimizing product preparation.
Robust Technical Advantages
  • Full automation via Zapier platform.
  • Dynamic AI interpretation, removing rigid rules.
  • Scalable for multi-location deployment.
  • Adaptable to additional data sources.
Optional Enhancements: Leveling Up the Automation
These advanced features can further elevate the weather-based automation, providing even greater control, insights, and communication capabilities.
Severe Weather Alert System
Implement triggers for extreme conditions (e.g., temp > 91°F, "storm" in description) to send specialized alerts.
SMS Staff Notifications
Integrate Twilio to instantly notify staff via SMS during critical weather events or significant operational changes.
Data Logging & Analytics
Automatically log daily weather and AI output into platforms like Airtable, Google Sheets, or Supabase for historical analysis and trend identification.
Branded HTML Email Templates
Upgrade to aesthetically pleasing, branded HTML templates for kiosk-style emails, enhancing visual appeal and professionalism.
Multi-Location Support
Extend the automation to manage separate workflows for various city locations, catering to distinct weather patterns and operational needs.
Challenges Faced & Future Improvements
Challenges During Development
  • OpenWeather API Key Activation Delay: Initial delays in API key activation (up to 2 hours) required persistent verification in Postman until a '200 OK' response was received.
  • Gemini AI Formatting Inconsistencies: The AI output often included undesirable characters (e.g., \\n, ", [ ]) that compromised the email's visual integrity.
The Solution: Formatter by Zapier & Prompt Clean-Up
Leveraged Zapier's Formatter (Text Replace) to systematically remove all escape characters and layout artifacts, ensuring a clean, professional, and readable email. Prompting instructions and keeping a certain layout in order for Gemini AI to properly interpret AI Output.
Future Enhancements (Time Permitting)
  • Develop HTML or branded email templates for enhanced aesthetics.
  • Create dashboards correlating past weather with sales data for deeper insights.
  • Implement SMS alerts for extreme weather conditions.
  • Add mobile push notifications for immediate staff updates.
  • Automate the storage of all daily outputs for comprehensive record-keeping.
Tools for More Aesthetic AI Automations
  • Make.com: Modern UI, visual scenario builder for complex workflows.
  • Framer + AI: For beautiful internal dashboards with live weather data.
  • Notion AI + Automations: To store outputs, generate summaries, and create manager-facing hubs.
  • Relevance AI / Lobe / Vercel AI: For advanced AI reasoning and custom agents.
  • Brevo / MailerLite: For designing beautifully formatted automated emails.
  • Zapier Interfaces / Tables / Canvas: To build front-end dashboards and collect human feedback.
Made with