Automate Clockify Monthly Backups to GitHub with n8n

This n8n workflow automates backing up detailed monthly Clockify reports to GitHub, eliminating manual export errors and time drain. Save hours each month by automatically fetching, comparing, and storing your time tracking data securely in your GitHub repo.
clockify
github
httpRequest
+7
Workflow Identifier: 2207
NODES in Use: Schedule Trigger, Clockify, Set, Split Out, HTTP Request, GitHub, Extract From File, Compare Datasets, Stop and Error, Filter
Automate Clockify backups to GitHub with n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow automatically backs up monthly detailed reports from Clockify to a GitHub repository daily. It solves the problem of manual exporting, renaming, and uploading reports, preventing data loss and errors. The result is a reliable, up-to-date backup of time tracking data stored in GitHub.

The workflow runs every day to fetch Clockify workspace data, generate reports for the last three months, check if report files exist on GitHub, compare new report data with existing backups, and create or update files as needed.


Who should use this workflow

Project managers or teams who manually export Clockify reports for backups and want to save time daily. It is useful for companies needing accurate, historical records of tracked hours for audits or billing.

This workflow fits users with basic knowledge of n8n and access to Clockify and GitHub with required API credentials.


Tools and services used

  • Clockify API: Provides workspace IDs and detailed monthly time reports in JSON format.
  • GitHub API: Manages backup files by checking, creating, or updating JSON reports in the repository.
  • n8n workflow automation platform: Orchestrates scheduled triggers and API calls to automate the backup process.

How the workflow works (Input → Process → Output)

Inputs

  • Clockify API key to access workspace and reports.
  • GitHub API key with repo write permissions.
  • Settings for GitHub repository owner and name.
  • Date information to generate reports for the current and previous two months.

Processing Steps

  • Schedule daily trigger at 5 AM starts the workflow.
  • Retrieve first Clockify workspace ID for API calls.
  • Store global variables like workspace ID and GitHub repo info.
  • Define three month indexes [0,1,2] meaning current month and previous two.
  • Split month indexes to process separately in sequence.
  • Calculate start and end dates for each month and build report file name (e.g., detailed_report_2024-06.json).
  • Request detailed report JSON from Clockify API for each month.
  • Check if report file exists in GitHub repository.
  • If file exists, extract existing JSON data for comparison.
  • Compare new report data with existing data to detect any changes.
  • Skip empty reports with no time entries.
  • Create new file or update existing file on GitHub if there are changes.
  • Stop workflow with error message if API requests fail or data is missing.

Outputs

  • JSON report files in GitHub repository for three months, named with consistent date-encoded filenames.
  • Accurate historical backups stored in version-controlled GitHub.
  • Error messages logged in workflow if issues occur.

Beginner step-by-step: How to run this workflow in n8n

1. Import Workflow

  1. Download the provided workflow file from this page.
  2. In the n8n editor, click on the menu and select Import from File.
  3. Choose the downloaded workflow file to load it.

2. Configure API Credentials

  1. Add your Clockify API Key credential in n8n’s credential manager.
  2. Add your GitHub API Key credential with write access to the target repository.
  3. In the Globals node, update the repository owner and repository name fields to match your GitHub repo.
  4. Verify the workspace ID is set automatically, or update manually if needed.

3. Test the Workflow

  1. Manually run the workflow once in n8n to check if the reports create in GitHub properly.
  2. Look at the execution logs for any errors or failures and fix configuration issues.

4. Activate the Workflow

  1. After successful test, activate the Schedule Trigger node to make it run daily at 5 AM automatically.
  2. Monitor the workflow executions periodically to confirm backups are working as expected.

Optional: For more control or privacy, consider self-host n8n to run this workflow on your own server or VPS.


Edge cases and failures

If the GitHub report file path is wrong or the file doesn’t exist, the workflow may error when checking existence. Check and fix repo owner/name in the Globals node.

Clockify API calls may fail if API keys are invalid or expired, causing no reports to be fetched. Refresh Clockify API credentials if needed.

If GitHub API token lacks write permission, file creation or updates will fail. Make sure the token scopes include write access for the repository.


Customization ideas

  • Increase backup range by changing month indexes array to more months, like [0,1,2,3,4].
  • Change the Schedule Trigger node settings to run at different times or frequencies.
  • Switch GitHub repository owner or name in the Globals node for backups in another repo.
  • Adjust Get detailed monthly report node’s pageSize parameter to fetch larger report pages.
  • Add notification nodes (email or Slack) after GitHub updates for alerting backup status.

Summary of results

✓ Saves 3+ hours monthly by automating report export.
✓ Prevents manual errors and data loss in backups.
✓ Stores time tracking reports reliably in GitHub with version control.
✓ Automatically runs daily to keep reports up-to-date.
✓ Provides error stopping and messages for troubleshooting.

Automate Clockify backups to GitHub with n8n

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

Yes, if the GitHub API credentials have access and write permissions for the private repository.
The workflow runs daily and backs up reports for the current and previous two months.
The GitHub API key must have write access to create or update files in the target repository.
The workflow will fail when calling the Clockify API and stop with an error message. The API key must be valid and active.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.