Detect scope creep in client emails with Gmail, OpenAI and Google 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) (New client email)
Nodes used (13)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Google Docs
n8n-nodes-base.googleDocs - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Filter
n8n-nodes-base.filter - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail - No Operation, do nothing
n8n-nodes-base.noOp
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.