🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Clockify to GitHub, versioned time report backups

Lisa Granqvist Partner Workflow Automation Expert

Time reports shouldn’t feel fragile. But when someone updates an entry after the fact (or a client questions a number), you’re stuck hunting through exports, screenshots, and “what did it say last week?” messages.

This is where Clockify GitHub backups start paying for themselves. Agency owners get fewer billing disputes, ops leads get cleaner month-end reporting, and consultants finally have a paper trail that doesn’t live in someone’s inbox.

This workflow automatically saves your Clockify monthly reports into a private GitHub repo as versioned files, so you can track edits over time and pull an audit-ready snapshot whenever you need it.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Clockify to GitHub, versioned time report backups

The Problem: Time Reports Change After You Export Them

Clockify data is “live.” That’s great until it isn’t. People fix descriptions, shift time between projects, update tags, or log time late. Then your “final” monthly report is no longer final, and you’re left explaining why last month’s invoice doesn’t match this month’s export. It also creates quiet risk inside the business: leadership decisions get made from numbers that might drift, and nobody knows exactly when they changed. Frankly, this is how small errors become long, awkward threads.

The friction compounds. It shows up in a few predictable places:

  • You export a report, then discover it was edited later, and now you can’t prove what the original said.
  • Clients ask for a breakdown “as of invoice date,” and you’re rebuilding history from memory.
  • Month-end admin turns into recurring detective work, especially when multiple people touch the same projects.
  • There’s no clean diff of what changed, so disputes become opinion-based instead of evidence-based.

The Solution: Daily Versioned Backups of Clockify Monthly Reports

This workflow runs on a daily schedule and pulls your Clockify workspace reporting data via the Clockify Reports API. Instead of saving a single export that gets stale, it generates a report file for each month (by default, the current month plus the previous three). Then it checks your private GitHub repository to see if a file already exists for that month. If it does, the workflow compares the newly fetched report with the existing file and only updates GitHub when something actually changed. If the file is missing, it creates it, so your backups build themselves over time.

It starts with a scheduled run, grabs your primary workspace, and expands a small month list into individual month “batches.” Each batch computes the date range, requests the monthly detail report, and then either creates or updates a versioned file in GitHub. The end result is a commit history you can point to with confidence.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you manage one Clockify workspace and you export four monthly reports (current month plus three prior) every day during busy periods to keep invoices aligned. If each export, naming, and filing step takes about 5 minutes, that’s roughly 20 minutes a day. Over a month, you’re at about 10 hours of repetitive work. With this workflow, the “work” becomes a scheduled run and a few minutes to review GitHub only when you care to. The backups happen in the background, and your report history stays intact.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Clockify as the source of time entry reporting data.
  • GitHub to store versioned monthly report files.
  • Clockify API key (get it from your Clockify profile settings).

Skill level: Intermediate. You’ll connect credentials, create a private repo, and confirm a few report parameters like workspace and date ranges.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A daily schedule kicks things off. n8n runs the workflow automatically (daily by default), so backups stay current even when the team forgets about reporting.

Your Clockify workspace is identified. The workflow fetches the primary workspace first, then sets a few global values it uses throughout the run (like where to store files and which months to process).

Recent months are expanded into a short “to-do” list. It assigns month indices and splits them into individual items, then computes each month’s start and end date before requesting the detailed monthly report via HTTP.

GitHub becomes your source of truth for history. For each month, the workflow locates the matching file in GitHub, compares the newly fetched report to what’s already stored, and then updates or creates the file. Empty reports are filtered out so you don’t clutter the repo.

You can easily modify the number of months backed up to cover a longer window based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Scheduled Trigger

Set the schedule that starts the workflow each day.

  1. Add the Scheduled Run Trigger node and open its settings.
  2. Set the schedule rule to trigger at triggerAtHour: 5 so it runs daily at 5:00.
  3. Connect Scheduled Run Trigger to Fetch Primary Workspace.

Step 2: Connect Clockify and Define Global Settings

Fetch the workspace and define global variables used across the workflow.

  1. Configure Fetch Primary Workspace with Resource set to workspace and Limit set to 1.
  2. Credential Required: Connect your clockifyApi credentials in Fetch Primary Workspace.
  3. In Define Globals, set workspace_id to {{ $json.id }}.
  4. In Define Globals, set github_repo.owner and github_repo.name to your GitHub owner and repository values.
  5. Connect Fetch Primary WorkspaceDefine GlobalsAssign Month Indices.

Step 3: Build the Month Loop and Date Ranges

Create a rolling list of months and compute report ranges.

  1. In Assign Month Indices, set monthIndex to [0, 1, 2] to process the current and previous two months.
  2. In Expand Month List, set Field to Split Out to monthIndex.
  3. In Compute Date Range, set reportName to =detailed_report_{{ $now.minus($json.monthIndex, 'month').format('yyyy-MM') }}.
  4. Set startDate to {{ $now.minus($json.monthIndex, 'month').startOf('month').format('yyyy-MM-dd') }}.
  5. Set endDate to {{ $now.minus($json.monthIndex, 'month').endOf('month').format('yyyy-MM-dd') }}.

Tip: If you want a longer backup history, expand the monthIndex array in Assign Month Indices.

Step 4: Request Clockify Reports and Locate GitHub Files

Fetch monthly report data and look up existing files in GitHub.

  1. In Request Monthly Detail, set URL to https://reports.api.clockify.me/v1/workspaces/{{ $('Define Globals').item.json.workspace_id }}/reports/detailed.
  2. Set Method to POST and JSON Body to { "dateRangeStart": "{{ $json.startDate }}T00:00:00Z", "dateRangeEnd": "{{ $json.endDate }}T23:59:59.999Z", "detailedFilter": { "page": 1, "pageSize": 50 }, "exportType": "json" }.
  3. Credential Required: Connect your clockifyApi credentials in Request Monthly Detail.
  4. In Locate GitHub File, set File Path to reports/{{ $('Compute Date Range').item.json.reportName }}.
  5. Credential Required: Connect your githubApi credentials in Locate GitHub File.
  6. Note the parallel flow: Locate GitHub File outputs to both Map New Report Data and Parse File Data in parallel.

⚠️ Common Pitfall: Make sure github_repo.owner and github_repo.name are populated in Define Globals or the GitHub nodes will fail to find the repository.

Step 5: Compare Data and Update Existing Reports

Parse existing files, compare with new data, and update reports if needed.

  1. In Map New Report Data, set data to {{ $('Request Monthly Detail').item.json.timeentries }}.
  2. In Parse File Data, set Operation to fromJson to parse the file content.
  3. In Compare Records, set Merge By Fields to compare data against data.
  4. In Modify GitHub File, set File Path to reports/{{ $('Compute Date Range').item.json.reportName }}.
  5. Set File Content to {{ JSON.stringify($json.data, null, 2) }} and Commit Message to Update report.
  6. Credential Required: Connect your githubApi credentials in Modify GitHub File.

Step 6: Create New Reports When Files Are Missing

Handle missing files and only create reports when there is data.

  1. In Detect Missing File, confirm the condition checks {{ $json.error }} contains could not be found.
  2. In Filter Empty Reports, ensure the condition checks {{ $json.timeentries }} is notEmpty.
  3. In Create GitHub File, set File Path to reports/{{ $('Compute Date Range').item.json.reportName }}.
  4. Set File Content to {{ JSON.stringify($json.timeentries, null, 2) }} and Commit Message to Create report.
  5. Credential Required: Connect your githubApi credentials in Create GitHub File.

Step 7: Add Error Handling

Stop the workflow when errors are not related to missing files.

  1. Verify Locate GitHub File has Continue On Fail behavior (it outputs to the error branch when the file is missing).
  2. Connect the false path of Detect Missing File to Halt on Error.
  3. In Halt on Error, set Error Message to {{ $json.error }}.

Step 8: Test and Activate Your Workflow

Validate the run and turn on the schedule.

  1. Click Execute Workflow to run Scheduled Run Trigger manually.
  2. Confirm that Request Monthly Detail returns timeentries and that Locate GitHub File finds or routes missing files correctly.
  3. Verify GitHub updates: Modify GitHub File should commit updated JSON, or Create GitHub File should create a new file under reports/.
  4. Set the workflow to Active to enable the daily run at 5:00.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • GitHub credentials can expire or need specific permissions. If things break, check the repo access token scopes and the n8n Credentials screen first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Clockify GitHub backups automation?

About 30 minutes once your API keys and repo are ready.

Do I need coding skills to automate Clockify GitHub backups?

No. You’ll mostly connect accounts and paste API keys. The workflow logic is already built, so you’re configuring, not programming.

Is n8n free to use for this Clockify GitHub backups workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Clockify and GitHub usage, which is typically minimal for small monthly files.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Clockify GitHub backups workflow for a 12-month history instead of 3?

Yes, but you’ll want to adjust it thoughtfully. Change the month list in the “Assign Month Indices” and “Expand Month List” portion so it generates 12 items instead of 4. If you also rename files (for example, by client or by workspace), update the mapping step that prepares the GitHub filename before “Locate GitHub File.” Common tweaks include switching from daily to weekly runs, storing JSON instead of CSV, and writing to a different branch for approvals.

Why is my Clockify connection failing in this workflow?

Usually it’s an expired or incorrect API key, so regenerate it in Clockify and update the credential in n8n. It can also be permissions related if the key doesn’t have access to the workspace you’re targeting. One more thing: make sure the Reports API endpoint you’re using matches your Clockify plan and that the workspace ID being fetched is the one you expect.

How many monthly reports can this Clockify GitHub backups automation handle?

A lot more than most small teams need. On n8n Cloud Starter, you’re limited by monthly executions, but a once-daily run backing up four months is still pretty lightweight. If you self-host, there’s no execution limit (it depends on your server), and this workflow is mostly API calls plus file updates.

Is this Clockify GitHub backups automation better than using Zapier or Make?

Often, yes, because the “compare then update” logic matters here and you don’t want to pay extra for multi-step branching. n8n is also comfortable with loops (processing multiple months in one run) and file comparison patterns that get awkward in simpler tools. Zapier or Make can still work if you only back up one export and don’t care about diffs, commits, or version history. If you need the audit trail to stand up in a client conversation, GitHub versioning is the whole point. Talk to an automation expert if you want help choosing the simplest setup.

Once this is running, time reports stop being a recurring fire drill. You get a living audit trail in GitHub, and you can get back to work that actually moves the business forward.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal