{"product_id":"n8n-alert-detect-stalled-scheduled-workflows-with-gmail","title":"n8n Alert: Detect Stalled Scheduled Workflows with Gmail","description":"\u003ch3\u003eStay ahead of silent failures: Gmail alerts for stalled n8n scheduled workflows\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow runs hourly to detect schedule-triggered workflows that have gone quiet—then sends a Gmail email alert when a workflow hasn’t completed within your configured timeout window. If a Schedule\/Cron\/Interval job stops running without errors, you’ll know fast.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eRuns every hour\u003c\/b\u003e on a schedule to continuously monitor your n8n instance.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eFetches active workflows\u003c\/b\u003e via the \u003cb\u003en8n REST API\u003c\/b\u003e (using your API key).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eFetches recent executions\u003c\/b\u003e via the \u003cb\u003en8n REST API\u003c\/b\u003e and compares them to the active workflows list.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eFilters to schedule-based triggers\u003c\/b\u003e (Schedule, Cron, or Interval) and keeps only workflows whose \u003cb\u003elast completed run\u003c\/b\u003e is older than the configured threshold (\u003ci\u003esilentAfterMinutes\u003c\/i\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eSends a Gmail alert\u003c\/b\u003e for each workflow that appears stalled—one email per affected workflow.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eSaaS operations monitoring:\u003c\/b\u003e Ensure scheduled automations keep running (no silent stoppages in production).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eAutomation engineering:\u003c\/b\u003e Get notified when an interval-based process stops completing for longer than expected.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eReliable scheduling for critical jobs:\u003c\/b\u003e Detect issues quickly for workflows triggered by Schedule\/Cron\/Interval.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eNodes \/ logic:\u003c\/b\u003e \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003ehttp request\u003c\/code\u003e, \u003ccode\u003egmail\u003c\/code\u003e, and supporting notes.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eIntegrations:\u003c\/b\u003e Uses the \u003cb\u003en8n REST API\u003c\/b\u003e with an API key sent as the \u003cb\u003e\u003ccode\u003eX-N8N-API-KEY\u003c\/code\u003e\u003c\/b\u003e header.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eAlerting:\u003c\/b\u003e Sends notifications via \u003cb\u003eGmail\u003c\/b\u003e (recipient address configured in the Gmail credential). You can swap the Alert node for other channels if needed.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup (quick)\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSet your \u003cb\u003en8n base URL\u003c\/b\u003e and the timeout window (\u003cb\u003esilentAfterMinutes\u003c\/b\u003e) in the \u003cb\u003eSettings\u003c\/b\u003e values.\u003c\/li\u003e\n  \u003cli\u003eCreate an \u003cb\u003en8n API key\u003c\/b\u003e and configure both \u003cb\u003eHTTP Request\u003c\/b\u003e nodes to use it via \u003ccode\u003eX-N8N-API-KEY\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003eAdd a \u003cb\u003eGmail credential\u003c\/b\u003e, set the recipient, and adjust the alert \u003cb\u003esubject\/message\u003c\/b\u003e to your preferences.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45931005804723,"sku":"N8N-18989","price":4.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/UjUaG71NZ0RgimSzuPa8Z_yRz3yYSp.png?v=1788253393","url":"https:\/\/buyflowscripts.com\/products\/n8n-alert-detect-stalled-scheduled-workflows-with-gmail","provider":"N8N Commerce","version":"1.0","type":"link"}