{"product_id":"n8n-workflow-reroute-delayed-shipments-with-openai-sheets-slack","title":"n8n Workflow: Reroute Delayed Shipments with OpenAI + Sheets + Slack","description":"\u003ch3\u003eAutomatically reroute delayed shipments—using OpenAI, Google Sheets, Slack approvals, and carrier TMS updates\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow detects delayed shipments from \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, summarizes delays in \u003cstrong\u003eTelegram\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI (gpt-4o-mini)\u003c\/strong\u003e to recommend alternate routes via a routing HTTP API, and—when needed—requests approval in \u003cstrong\u003eSlack\u003c\/strong\u003e before updating your carrier \u003cstrong\u003eTMS\u003c\/strong\u003e. Outcomes are logged back to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e and communicated via \u003cstrong\u003eGmail\u003c\/strong\u003e and \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 every 30 minutes\u003c\/strong\u003e using a schedule trigger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReads active shipments\u003c\/strong\u003e from Google Sheets and identifies delayed ones by comparing \u003cem\u003ePromised Delivery\u003c\/em\u003e vs \u003cem\u003eCurrent ETA\u003c\/em\u003e (or a “delayed” status), then calculates delay hours.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAlerts via Telegram\u003c\/strong\u003e when at least one delayed shipment is found, including a delay summary.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates reroute recommendations\u003c\/strong\u003e for each delayed shipment by calling a \u003cstrong\u003erouting HTTP API\u003c\/strong\u003e to fetch route options, then sending shipment + options to \u003cstrong\u003eOpenAI (gpt-4o-mini)\u003c\/strong\u003e for a structured reroute recommendation.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRequests human approval in Slack\u003c\/strong\u003e when the AI flags the decision as requiring approval, and waits for an approve\/reject response.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpdates carrier routing via HTTP\u003c\/strong\u003e (carrier TMS HTTP API) for approved reroutes, updates the shipment record in Google Sheets, emails the customer via \u003cstrong\u003eGmail\u003c\/strong\u003e, and posts confirmation to Slack.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEscalates rejected recommendations\u003c\/strong\u003e by marking the shipment as “escalated for manual review” in Google Sheets and notifying the ops Slack channel.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eOps teams need faster action when ETAs slip across regions or carriers.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators want automated reroute suggestions with \u003cstrong\u003eSlack approvals\u003c\/strong\u003e to reduce risky fully-automated changes.\u003c\/li\u003e\n  \u003cli\u003eLogistics teams centralize shipment truth in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e and route changes through a carrier \u003cstrong\u003eTMS\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eIntegrations\/auth: \u003cstrong\u003eGoogle Sheets OAuth2\u003c\/strong\u003e, \u003cstrong\u003eOpenAI\u003c\/strong\u003e, \u003cstrong\u003eTelegram Bot API\u003c\/strong\u003e, \u003cstrong\u003eSlack OAuth2\u003c\/strong\u003e, \u003cstrong\u003eGmail OAuth2\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eCore n8n nodes\/workflow logic: \u003cstrong\u003eSchedule trigger\u003c\/strong\u003e, \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003egmail\u003c\/strong\u003e, \u003cstrong\u003eslack\u003c\/strong\u003e, and \u003cstrong\u003esplit out\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eDecisioning: structured output from \u003cstrong\u003egpt-4o-mini\u003c\/strong\u003e, including approve\/reject handling.\u003c\/li\u003e\n  \u003cli\u003eRouting updates: \u003cstrong\u003eHTTP\u003c\/strong\u003e calls to the routing API and \u003cstrong\u003ecarrier TMS HTTP API\u003c\/strong\u003e, with results written back to Google Sheets and posted to Slack.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eGet this n8n workflow\u003c\/strong\u003e to operationalize delayed shipment rerouting with AI-assisted routing, Slack approvals, and end-to-end notifications.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45978871038131,"sku":"N8N-19374","price":34.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/4nzlbuWYBkM9p_2DWY-an_Hr6lydea.png?v=1788858236","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-reroute-delayed-shipments-with-openai-sheets-slack","provider":"N8N Commerce","version":"1.0","type":"link"}