Route critical out-of-office emails with Gmail, Gemini, Slack and Sheets
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Worth a look
- Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When Email Received)
Nodes used (8)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - No Operation, do nothing
n8n-nodes-base.noOp
What it does
Quick overview This workflow monitors a Gmail inbox for new unread emails, uses Google Gemini to classify whether each message is critical during out-of-office coverage, and for critical items alerts a backup on Slack, replies to the sender via Gmail, logs the escalation to Google Sheets, and labels the email. How it works 1. Triggers every minute when a new unread email arrives in Gmail (excluding Promotions and Social categories). 2. Extracts key fields from the email (sender, subject, snippet, message ID, and thread ID) and loads out-of-office routing settings. 3. Sends the email details to the Google Gemini API and parses the JSON response to determine whether the message is critical, along with a category, urgency reason, and Slack-ready summary. 4. If the email is critical, posts an escalation message to a specified Slack channel and mentions the designated backup person. 5. Replies to the sender in Gmail with an out-of-office message that loops in the backup contact. 6. Appends the escalation details to a Google Sheets log and adds a Gmail label to the original message. 7. If the email is not critical, it takes no further action. Setup 1. Connect Gmail OAuth2 credentials for both the inbox trigger and the Gmail reply/label actions. 2. Add Google Gemini (PaLM) API credentials for the HTTP request to the Gemini generateContent endpoint. 3. Connect Slack OAuth credentials and set the target Slack channel ID and backup Slack user ID used for mentions. 4. Connect Google Sheets credentials (service account) and update the spreadsheet document ID, sheet/tab, and column headers used for logging. 5. Update the workflow’s configuration values (backup name/email, company/product name, return date, and the Gmail label ID to apply to escalated emails).