Review employee overtime compliance with Google Sheets, GPT-4o-mini, and Gmail
Needs changesWhat this workflow does
This AI workflow has 12 nodes and runs on a schedule (every week at 18:00). Along the way it connects Google Sheets, OpenAI Chat Model and Gmail.
How it runs
Trigger: On a schedule (every week at 18:00).
- Read Timesheet from Sheets (Google Sheets): uses Google Sheets
- Summarize: summarizes / groups the items
- Set Overtime Status Fields (Edit Fields (Set)): sets 9 fields: EmployeeName, EmployeeEmail, ManagerEmail…
- If: checks a condition and branches into true / false
- AI Overtime Escalation Agent (AI Agent): runs an AI agent, with model: OpenAI GPT-4 Model
- Build Overtime Approval Record (Edit Fields (Set)): sets 5 fields: EmployeeName, Department, TotalHours…
- Prepare Escalation Email Data (Edit Fields (Set)): sets 10 fields: EmployeeName, EmployeeEmail, ManagerEmail…
- Log Compliant Overtime Entry (Google Sheets): append
- Send Overtime Email (Gmail): uses Gmail
- Log Flagged Overtime Entry (Google Sheets): append
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Overtime Escalation Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Overtime Escalation Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Summarize
n8n-nodes-base.summarize - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow runs weekly to total employee timesheet hours from Google Sheets, assess overtime thresholds, and use OpenAI to draft escalation notes for over-40-hour cases, then emails Payroll/HR via Gmail and logs outcomes back to Google…