Track mandatory paid leave with Gemini, Gmail, Google Sheets and Slack

Go to Workflow
0 views
Built by sho  oda sho oda
Created on August 31, 2026

Description

Quick overview
This monthly workflow reads employee and leave data from Google Sheets, calculates who risks missing Japan’s mandatory paid-leave minimum, generates Japanese reminder copy with Google Gemini, then emails employees via Gmail, posts a summary to Slack, and logs each notification back to Google Sheets.

How it works
Runs on the first day of each month.
Loads the employee roster and paid-leave records from two tabs in Google Sheets and combines them by employee ID.
Calculates each active employee’s current leave-year grant date, deadline, days taken, and remaining shortfall against the required minimum.
Keeps only employees who still have a shortfall and whose deadline is within the configured alert window.
Uses Google Gemini to generate two Japanese messages: a short employee-friendly reminder and a one-line HR summary.
Sends the employee reminder via Gmail, posts the HR summary to a Slack channel, and appends a record of the notification to a Google Sheets log tab.

Setup
Add credentials for Google Sheets, Google Gemini (PaLM) API, Gmail, and Slack.
Provide your Google Sheets spreadsheet ID in the configuration values and ensure it contains the tabs Employees, LeaveLog, and NotificationLog with the expected columns (including employeeId).
Set your leave rules in the configuration values (grantMethod and fixedGrantMonthDay if used, requiredDays, and alertBeforeDays).
Set the target Slack channel name in the configuration values (and invite the Slack app/bot to that channel).
Confirm employee email addresses and leave dates are stored in a format the workflow can parse (YYYY-MM-DD), then run once and activate.

Nodes Used (6)

Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
Google Sheets
n8n-nodes-base.googleSheets
Slack
n8n-nodes-base.slack