# Send Gmail alerts for stalled scheduled workflows using the n8n API

> Quick overview This workflow runs hourly to check your n8n instance for active, schedule-triggered workflows that have not completed an execution within a defined time window, and sends an alert email via Gmail when any workflow appears to have silently stopped running. How it works 1. Runs every hour on a schedule. 2. Calls the n8n REST API to fetch all active workflows. 3. Calls the n8n REST API to fetch the most recent execution records. 4. Compares active workflows against recent executions, keeping only schedule-based workflows whose last completed run is older than the configured threshold. 5. Sends a Gmail email alert for each workflow that has been quiet for longer than the threshold. Setup 1. Set your n8n base URL and the timeout window (in minutes) in the Settings values. 2. Create an n8n API key and configure both n8n REST API HTTP requests to send it as an X-N8N-API-KEY header. 3. Add a Gmail credential, set the recipient address, and adjust the alert message/subject to mat

- **Domain**: `n8n-workflow-18989.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/18989
- Page (HTML): https://agenstry.com/agents/n8n-workflow-18989.n8n.io
- Documentation: https://n8n.io/workflows/18989
