Try the Timesheet Guardian → The page checks an entry in your browser and draws a live chart. The real forms are at mikweb.eu/form/zeitwaechter (hours) and /zeitwaechter-abwesenheit (absences). All data is demo data and the people are made up (Musterbüro GmbH).
Why bother
Since the Federal Labour Court ruling of 13 September 2022 (1 ABR 22/21), German employers have to record working time. A spreadsheet often does the job. What it does not do is tell you that someone worked 11 hours yesterday without a proper break and starts again at 06:00 today. That usually surfaces when someone reads the list at month end. I wanted the violation to trigger a card and a message the same evening, with nothing more exotic than n8n, Nextcloud and a CSV.
Legal status: the recording duty has applied since 2022. A reform of the Working Hours Act (a draft from the federal labour ministry) had not been passed as far as I knew in June 2026. Check where it stands today. This is a technical example and not legal advice.
What the workflow does
- Two n8n forms: hours (person, date, start, end, break, project, activity) and absence (person, from, to, kind: vacation, sick leave or flextime off).
- Validation of the input (format, times, date), then saving to
zeiten.csvin Nextcloud over WebDAV. - ArbZG check over all rows, then a comparison with the state before the entry: only new violations trigger anything.
- On a new violation: a card in Nextcloud Deck and a message in Talk.
- Absences become CalDAV events. A second check finds hours logged on a day of absence.
- Friday 15:00: a weekly report as Markdown and as an SVG dashboard in Nextcloud, plus Talk.
- Monday: the demo data is reset.
The rules
- Section 3: at most 10 hours a day, 8 hours on average.
- Section 4: a 30-minute break after more than 6 hours, 45 minutes after more than 9.
- Section 5: 11 hours of uninterrupted rest between two working days.
- Section 9: Sunday work.
- Hint: more than 48 hours in a week. A hint, not a violation: the law works with averages.
All of it is deterministic code (core.js, over 100 checks pass in node test_core.js). The AI (IONOS gpt-oss-120b) writes only three sentences of the weekly report and sees no names, only numbers. Whether someone broke the law is never decided by a language model.
Concurrent writes: ETag and If-Match
Two people submit at the same time, both read the CSV, both write it back: one entry is gone. So, optimistic locking over WebDAV: GET returns the file with its ETag, and the PUT sends If-Match: <ETag>. If the file changed in between, Nextcloud answers 412 Precondition Failed. The workflow then reads again and retries, up to three times. After the third failure it says so, instead of overwriting something silently.
What I learned on n8n 2.46.6
- Do not set "Respond When" to "Using Respond to Webhook". With Form Trigger v2.5 and the n8n Form node you get "Respond to Webhook not supported in workflows initiated by Form Trigger" or "No Respond to Webhook node found". Leave the default: the Form node gives the response.
- The Form node's Completion operation with "Show Text" accepts full HTML. The response can be an entire page, including an inline SVG chart. Mechanically: the form POST returns JSON with
formWaitingUrl, the browser goes to/form-waiting/<id>, and the page appears there. - HTTP Request with full response and text: the content is in
data, notbody. Myres.bodywasundefinedand the CSV was rewritten with a single row. Since then there is a data-loss guard: if parsing yields zero rows although the file is not empty, the run stops instead of writing. - Which of the five triggers fired? Check
$('Node').isExecuted; that lets one workflow serve all of them. - The Code node has no
URLclass. Use regular expressions. - CSV injection. Cells starting with
=,+,-or@get a leading'. Otherwise Excel runs a formula hidden in a project name. - Nextcloud WebDAV:
If-Matchwith the ETag from the GET works, and a stale ETag gives 412. That is exactly what you need.
Clock in with a QR code: no form anymore
Forms suit office people. Anyone on the shop floor, in the warehouse or on the road just wants to scan. So there is a second path, again entirely in n8n and Nextcloud:
- Register the phone once (/en/zeit/register/): pick a person, the phone gets a random device token. Only its SHA-256 hash is stored, in
geraete.jsonin Nextcloud. The demo uses the four fictional people; in real use the office would send an invite link. - Daily QR at the entrance (/en/zeit-qr/): four codes (start, break, resume, end). Each is an HMAC-SHA-256 of date and kind, with the key only on the server. Tomorrow every code is different, so a photo from yesterday is useless.
- Scan with the camera: the page punches by itself. n8n sets the time (the server's Berlin time), never the phone. Only on end a field for the activity appears.
- State machine per person and day: start, (break, resume) any number of times, end. Start twice gives
wrong_state. Every punch lands instempel.csv. - On end it becomes a booking and goes through the same nodes as the form: overlap, ArbZG check, Deck, Talk, absence calendar.
Two notes: SHA-256 and HMAC are plain JavaScript inside the Code node (no crypto, no require), checked against the RFC 4231 test vectors. And honestly: a QR code can be photographed and forwarded. The device token and the daily code make that harder, they do not prevent it. A screen with a rotating code or a location check would be the next step. Time data tied to a private phone is personal data: in real use you need information and a legal basis (works council, data protection).
Try it and download it
Download the workflow JSON → Import it, add your own Nextcloud and IONOS credentials, and adjust the Nextcloud path, Deck board and Talk room. No secrets are in the JSON. The AI sentences are optional: without the credential the report keeps the numbers.
Limits
This is a demo setup, not a production timekeeping system. The data is made up. No works council, no collective agreements, no exceptions under section 7 or sector rules (care, hospitality, transport), and different rules apply to minors, pregnant employees and drivers. The thresholds follow the text of the law but do not replace a review by someone who knows your company. What the reform changes is not covered here: please read up on the current state.
Related: the Rubber Stamp Test shows why "a human looks at it" is not enough on its own. Here the code does the checking, and the human only sees the cases that matter.