Quick overview
This workflow runs every weekday at 07:00 (Europe/Berlin) to review Clockify time entries against key German ArbZG rules, enriches checks with Nager.Date public holidays, stores results in n8n Data Tables, and emails employees, managers, and HR about missing breaks, short rests, long days, and other issues.
How it works
- Runs every weekday at 07:00 (Europe/Berlin) and loads configuration such as workspace details, limits, and email recipients.
- Builds the lookback date window, fetches German public holidays from the Nager.Date API, and optionally switches to built-in sample data for test runs.
- Creates and maintains n8n Data Tables (wt_staff, wt_findings, wt_days), deletes rows older than the retention period, and loads the staff list plus previously recorded findings and day totals.
- Retrieves active users from the Clockify workspace, matches them to wt_staff, then pulls each matched user’s time entries for the window and reads any in-progress timers.
- Groups entries into working days (including breaks) and applies ArbZG-oriented checks for missing/insufficient breaks, rest periods below the threshold, workdays over the max hours, Sunday/public-holiday work, long entries, running timers, and missing entries.
- Prepares notifications and weekly HR reporting, sends the appropriate emails via SMTP (employee vs. manager vs. HR), and records each sent (or failed) finding and daily totals back into the Data Tables to avoid duplicate alerts.
Setup
- Import the workflow, add an SMTP credential to the five e-mail nodes, and fill in senderEmail (From) and hrEmail (summary, every test e-mail) in the Working-time settings node.
- Click Execute: it checks a week of invented sample entries without Clockify, sends every e-mail to hrEmail marked TEST, and creates the tables wt_staff, wt_findings and wt_days. No Clockify account is needed for this step.
- Add a Clockify credential (a workspace admin's API key: Profile settings, Advanced, Manage API keys, Generate new) to the three Clockify nodes; fill in clockifyWorkspaceId and clockifyRegion (global, or euc1 for workspaces in Germany) and set trySamples to false. Real runs refuse the example values.
- Add your people to wt_staff (email as in Clockify, name, managerEmail, state of the workplace such as BY or NW, and optionally rules, workdays, absentUntil), then publish the workflow.
Requirements
- n8n with Data tables (tested on n8n 2.48.7)
- An SMTP account for the five e-mail nodes
- A Clockify workspace and a workspace admin's API key; the free Clockify plan allows 30 API requests an hour, and a run needs at least one per person, plus two
- Public holidays come from Nager.Date (date.nager.at), which needs no key
Customization
- lookBackDays (5) checks each complete day on at least two runs; keepMonths (24) sets how long rows in wt_findings and wt_days are kept
- maxDayHours (10) and minRestHours (11): change them only as far as a collective agreement allows (§ 7 ArbZG)
- extraHolidays: local public holidays Nager.Date does not list, such as BY:2026-08-15 (Catholic communities in Bavaria); a date alone counts everywhere
- Per person in wt_staff: rules rest10 for the sectors of § 5 (2), none for people outside the ArbZG (§ 18); workdays such as Mo,Tu,Th; absentUntil pauses missing-entry reminders
- Use it only to keep the working-time rules, never to rate performance: tell your staff (art. 13 GDPR) and agree with a works council first (§ 87 BetrVG)
Additional info
All sample people and addresses are invented (example.com), and clockifyWorkspaceId 000000000000000000000000 is a placeholder: a real run stops while it, or an example.com address in senderEmail or hrEmail, is left. Execute runs a week of samples without Clockify, and every e-mail of a test run goes to hrEmail, so an SMTP credential and your addresses in senderEmail and hrEmail are all it takes to review it. The rules are interval arithmetic in German time (night shifts, daylight saving, public holidays by state), so they live in Code: seven Code nodes in all (settings, staff matching, samples, four rule steps), none over 7,300 characters; who hears about which finding is set in the Switch "Who is told?".
Limits: German working-time law only (not JArbSchG, MuSchG). It checks entries as recorded, not the 6-month average of § 3, the compensation of § 5 (2), nor the Sunday exceptions of § 9 (2), (3) and § 10. Tested live on n8n 2.48.7 with a real mail server and a Clockify stand-in built from the Clockify API documentation. Not legal advice.