Quick overview
This workflow collects new-hire details via an n8n form, calculates Japanese statutory filing tasks and deadlines, uses Google Gemini to generate a Japanese HR checklist, stores tasks in Google Sheets, and posts checklists plus daily due/overdue reminders to Slack.
How it works
- Triggers either when HR submits the n8n form or daily at 09:00 (Asia/Tokyo) via a schedule.
- Validates the submitted employee details and posts validation errors to Slack if the input is invalid.
- Reads existing rows from Google Sheets, computes statutory filing tasks and due dates (rolling deadlines to the next business day), and skips tasks that already exist to avoid duplicates.
- Sends the computed tasks to Google Gemini to produce a friendly Japanese checklist, falling back to a plain checklist if the Gemini call fails.
- Appends one row per new task to Google Sheets and posts the checklist to the configured Slack channel.
- On the daily run, reads open tasks from Google Sheets, identifies items due within the configured reminder window or overdue, and posts a grouped reminder digest to Slack.
- Updates the reminded tasks in Google Sheets with today’s date in last_reminded to prevent duplicate reminders on re-runs.
Setup
- Create a Google Sheet with a Tasks tab containing the required headers (task_key, employee_id, employee_name, hire_date, task_type, task_title, filing_office, legal_basis, due_date, status, checklist_note, created_at, last_reminded).
- Add Google Sheets credentials, Slack credentials, and Google Gemini (PaLM/Gemini) credentials in n8n.
- In the workflow’s configuration step, set your sheetId, tasksSheetGid (the tab gid), slackChannelId, reminderDays, largeEmployer, and any holiday dates used to roll deadlines.
- Copy and share the n8n form URL with HR, and ensure the Slack channel allows the bot/app to post messages.