Templates / Detect scope creep in client emails with Gmail, OpenAI and Google Sheets

Detect scope creep in client emails with Gmail, OpenAI and Google Sheets

Ready for 3.0

by Samruddhi Mokal · 0 views · created 2026-10-13 · Ticket Management, AI Summarization

Ready 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

Nodes used (13)

GmailGoogle DocsBasic LLM ChainOpenAI Chat ModelStructured Output ParserGoogle SheetsSlack

What it does

Quick Overview This workflow monitors a Gmail inbox for client emails, looks up the client’s statement of work in Google Docs, uses OpenAI to classify requests as in-scope or scope creep, logs each request to Google Sheets, and notifies your team in Slack while saving a change-order reply as a Gmail draft. How it works 1. Triggers every minute on new emails in a Gmail inbox matching the configured search query. 2. Extracts the sender domain, ignores emails from unmapped domains, and associates matched domains with the correct SOW Google Docs URL. 3. Fetches the client’s current SOW content from Google Docs and sends it with the email content to OpenAI to return a structured verdict, clause citation, effort estimate, and draft reply. 4. Drops messages classified as notarequest and prepares a log record with estimated hours and value based on your hourly rate. 5. Appends the request details and verdict to a Google Sheets tab named “Scope Log” including a direct Gmail thread link. 6. If the verdict is outofscope or unclear, posts an alert to a Slack channel and creates a Gmail draft reply in the same thread; otherwise it only logs the in-scope request. Setup 1. Connect credentials for Gmail, Google Docs, Google Sheets, Slack, and OpenAI (ChatGPT/OpenAI API) in n8n. 2. Update the clientsowmap JSON to map each client email domain to its SOW Google Docs URL. 3. Create or select a Google Sheet and set its ID in sheetid, and ensure a tab named “Scope Log” exists with the expected columns (checkedat, clientdomain, fromemail, subject, requestsummary, verdict, matchingclause, estimatedhours, estimatedvalue, threadlink). 4. Set your hourlyrate, currency, Slack channel name, and signoffname in the configuration values. 5. Adjust the Gmail search query in the trigger if you want to monitor a different label, shared inbox, or filtering rule.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.