Monitor overtime risk against Japanese labour caps with Gemini, Sheets, Slack & Gmail
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs on a schedule (every week at 07:00). Along the way it connects Google Sheets, Google Gemini Chat Model, Slack and Gmail.
How it runs
Trigger: On a schedule (every week at 07:00).
- Set Legal Limits (Edit Fields (Set)): sets 4 fields: monthlyLimit, warningThreshold, singleMonthMax…
- Get Attendance Records (Google Sheets): uses Google Sheets
- Aggregate Overtime by Employee (Code): runs custom JavaScript code
- Assess Overtime Risk with Gemini (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model; output parser: Overtime Risk Parser
- Parse Overtime Risk (Code): runs custom JavaScript code
- Report Assessment Failure (Slack): uses Slack
- Update Overtime Status (Google Sheets): append or update
- Route by Risk Level (Switch): routes items into 3 branches
- Alert HR Immediately (Slack): uses Slack
- Warn Manager Early (Slack): uses Slack
…plus 2 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - Slack
n8n-nodes-base.slack - Gmail
n8n-nodes-base.gmail
From the author
Quick Overview This workflow runs weekly to read attendance overtime from Google Sheets, totals it per employee and month, uses Google Gemini to classify risk against Japanese labour-law limits, writes results back to Sheets, and escalates high-risk cases via…