{"product_id":"weather-based-delivery-holds-in-n8n-open-meteo-slack","title":"Weather-Based Delivery Holds in n8n: Open-Meteo + Slack","description":"\u003ch3\u003eAutomatically place delivery holds when severe weather hits—using Open-Meteo, Postgres, Gemini, ServiceNow, and Slack\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow polls \u003cstrong\u003eOpen-Meteo\u003c\/strong\u003e every 15 minutes and, when conditions like \u003cstrong\u003eheavy snow\u003c\/strong\u003e, \u003cstrong\u003eflood warnings\u003c\/strong\u003e, or \u003cstrong\u003elow visibility\u003c\/strong\u003e are detected, it identifies impacted stores, creates a \u003cstrong\u003eServiceNow incident\u003c\/strong\u003e, logs the alert in \u003cstrong\u003ePostgres\u003c\/strong\u003e, and notifies your team in \u003cstrong\u003eSlack\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns on a 15-minute schedule\u003c\/strong\u003e, loading a configured region, zip code, and coordinates.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls the Open-Meteo API\u003c\/strong\u003e for the current conditions and daily forecast, then evaluates whether the region meets thresholds for heavy snow, flood warning, or low-visibility risk.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePrevents duplicate holds\u003c\/strong\u003e by querying \u003cstrong\u003ePostgres\u003c\/strong\u003e for an existing active alert for the same region and event type within a cooldown window.\u003c\/li\u003e\n  \u003cli\u003eIf no active duplicate exists, it \u003cstrong\u003einserts a new processing record\u003c\/strong\u003e in Postgres and fetches \u003cstrong\u003etoday’s delivery manifest\u003c\/strong\u003e rows for the region’s zip code.\u003c\/li\u003e\n  \u003cli\u003eUses \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e via an agent with \u003cstrong\u003estructured output\u003c\/strong\u003e to determine which stores are impacted and to generate an \u003cstrong\u003eincident summary\u003c\/strong\u003e, \u003cstrong\u003epriority\u003c\/strong\u003e, and \u003cstrong\u003eestimated delay\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates a ServiceNow incident\u003c\/strong\u003e using the AI-generated details, then updates the Postgres alert record as \u003cstrong\u003eactive\u003c\/strong\u003e (or \u003cstrong\u003eno_impact\u003c\/strong\u003e if no deliveries are affected).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends an operations summary to Slack\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIf the workflow fails at any point, it \u003cstrong\u003elogs execution errors to Postgres\u003c\/strong\u003e and sends a \u003cstrong\u003eSlack alert\u003c\/strong\u003e including the execution link.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eProactively managing \u003cstrong\u003eweather-based delivery holds\u003c\/strong\u003e for specific regions and zip codes.\u003c\/li\u003e\n  \u003cli\u003eReducing operator workload by automating \u003cstrong\u003eServiceNow incident creation\u003c\/strong\u003e with AI-generated summaries.\u003c\/li\u003e\n  \u003cli\u003eEnsuring consistent alerting through \u003cstrong\u003ecooldown-based duplicate suppression\u003c\/strong\u003e in Postgres.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpen-Meteo\u003c\/strong\u003e (weather data via API)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePostgres\u003c\/strong\u003e (alert log, cooldown checks, delivery manifest lookups, error logging)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e (agent with structured output for store impact, summary, priority, estimated delay)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eServiceNow\u003c\/strong\u003e (incident creation)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSlack\u003c\/strong\u003e (operations and failure notifications)\u003c\/li\u003e\n  \u003cli\u003en8n logic nodes including \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, and other supporting flow controls\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45950322245811,"sku":"N8N-19066","price":21.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/OksRHL__kLSABPnhKC6tR_GqSijlMf.png?v=1788514584","url":"https:\/\/buyflowscripts.com\/products\/weather-based-delivery-holds-in-n8n-open-meteo-slack","provider":"N8N Commerce","version":"1.0","type":"link"}