How to Connect QuickBooks and Clockify Using N8N for Construction Automation

Construction firms running QuickBooks Online for accounts and Clockify for field time tracking usually end up with a manual bridge between the two: someone exports timesheets, matches them against job codes by eye, and re keys hours into an invoice. That bridge is where billable time goes missing and where invoicing slips behind the work. This guide shows how to replace it with an n8n workflow that reads approved Clockify entries and writes clean QuickBooks invoices, including the parts most tutorials skip: approval gating, duplicate protection, token expiry, and UK specific VAT treatment for construction billing.

Why Manual Time to Invoice Handoffs Break Down

Clockify records time at the level of a crew member, a task, and a day. QuickBooks needs an invoice at the level of a customer, an item, and a rate. Someone has to sit between those two shapes of data every billing cycle, and that person usually has other things to do. The failure modes are consistent across contractors. Unapproved entries get invoiced because nobody checked the approval flag before pulling the export. Rates get applied flat across a crew when an electrician and a labourer should be billed at different amounts. Job codes drift, a supervisor types “Site 12” one week and “site12 block a” the next, and the spreadsheet formula that used to match them silently stops matching. Retention and staged billing terms mean invoicing gets batched monthly by habit, not by contract, so cash sits uncollected for weeks after the work is done.

None of this is a volume problem. It is a handoff problem: every manual step between a timesheet and an invoice is a place where the two systems’ data models disagree and a human has to reconcile them by memory. Automating the handoff does not remove the need for judgement, it moves the judgement into explicit rules the workflow enforces every time, rather than rules a tired admin applies inconsistently.

How the QuickBooks and Clockify Integration Works in n8n

Neither Clockify nor QuickBooks offers a native connection to the other. n8n sits in the middle as an orchestrator, holding credentials for both and reshaping data as it passes through. Clockify’s model is Workspace, Project, Task, Time Entry, User. QuickBooks Online’s model is Customer, Class or Location, Item, Invoice, Line. There is no automatic mapping between “Project” and “Customer”, so the workflow needs an explicit lookup, typically a small table (an Airtable base, a Google Sheet, or n8n’s own static data store) that maps each Clockify project key to a QuickBooks customer ID and the correct item ID for that type of labour.

Two trigger models are available. A webhook based trigger fires the moment a time entry changes, giving near instant sync, but it depends on Clockify sending that event reliably and on your Clockify plan supporting webhooks for your workspace, so check this before you design around it. A polling trigger checks for new or updated entries on an interval instead. Polling is simpler to reason about and easier to debug, and for invoicing, where you want entries batched and reviewed rather than invoiced the instant someone logs them, it is usually the better default. Full node and trigger documentation is in n8n’s own docs, which are worth bookmarking before you start building.

What You Need Before You Build This Workflow

On the QuickBooks side, register an app in the Intuit developer portal to get OAuth 2.0 client credentials, then complete the authorisation flow once so n8n can store a refresh token. Intuit also provides a sandbox company file through the same developer portal, and you should build and test the entire workflow against that sandbox before it ever touches a live company file. On the Clockify side, generate an API key from a user with access to the relevant workspace; a service account is preferable to a named employee’s personal key, since employees leave and keys tied to them expire with their access.

You also need the mapping table described above, built before you write a single node. Sit down with whoever manages job setup and agree a canonical project key format, then get every current project renamed to match it. This single step prevents more sync failures than any amount of clever error handling downstream. Finally, decide where n8n will run. Self hosted gives you full control over node versions and execution history retention; n8n Cloud removes the hosting overhead but ties your execution limits to a plan tier. Either way, keep credentials in n8n’s built in credential store, never inline in a Function node.

Step by Step Setup in n8n

The workflow below is deliberately more conservative than a bare trigger to invoice chain, because the naive version invoices unapproved hours and creates duplicates on retry. Build it in this order.

Add the Clockify Trigger Node

Authenticate with the workspace API key and, if your plan supports it, filter to entries flagged as approved rather than pulling every entry regardless of status. If your Clockify plan does not include an approvals feature, use the billable flag plus a manual review step later in the chain as a substitute gate, since invoicing unreviewed time is the single most common source of billing disputes on multi site jobs.

Normalise and Transform the Time Data

In a Function node, convert the duration from seconds to decimal hours and round it to a fixed increment that matches your contract terms, typically the nearest quarter hour, so the automated total does not disagree with a manually calculated one by a few minutes’ worth of pennies. Trim and lowercase the project key here as well, so “Site 12” and “site12 ” resolve to the same mapping table entry instead of two different ones.

return items.map(i => {
  const rawHours = i.json.timeInterval.duration / 3600;
  const roundedHours = Math.round(rawHours * 4) / 4;
  return {
    json: {
      projectKey: i.json.project.name.trim().toLowerCase(),
      hours: roundedHours,
      employee: i.json.user.name,
      approved: i.json.isApproved === true,
      task: i.json.description
    }
  };
});

Gate on Approval Before Anything Touches QuickBooks

Add an IF node immediately after the transform step that checks two things: the entry is approved, and the lowercased project key has a matching row in your mapping table. Anything that fails either check should route to a separate branch that writes to a “needs review” log and notifies an admin, rather than being invoiced with a guessed customer or silently dropped. This is the difference between an automation that occasionally invoices the wrong customer and one that flags the problem for a human before it becomes an invoice at all.

Configure the QuickBooks Invoice Node

Authenticate via OAuth 2.0 and select Create Invoice. Map the resolved customer ID from your lookup, and build the line item using the correct item reference for that labour type, with quantity set to the rounded hours and rate pulled from a rate table keyed by role or task rather than one flat labour rate, so job costing reports stay accurate when an electrician and a labourer log time on the same project. For UK contractors, also confirm the correct VAT treatment on each line: many subcontractor invoices in the building trade fall under the VAT domestic reverse charge for construction services, which changes who accounts for the VAT and needs the right tax code set automatically rather than defaulted, or your accounts team ends up correcting every invoice by hand. To prevent duplicate invoices when a run is retried, write the source Clockify entry ID into the invoice’s DocNumber or a private note, and have the node search for an existing invoice with that reference before creating a new one.

Run One Real Test Before You Schedule Anything

Approve a single entry in Clockify and run the workflow manually against your QuickBooks sandbox company. Confirm the invoice appears under the correct customer with the correct rate, item, and VAT code, and confirm running the same entry through a second time updates or skips rather than duplicating. If mapping fails, the cause is almost always a project key that was not normalised or a mapping table row that was never added, not a bug in the transform logic.

Schedule Batch Runs Instead of Real Time Sync

Invoicing every single time entry the instant it is logged produces a flood of tiny invoices and adds unnecessary load against QuickBooks Online’s API request limits, which Intuit documents in its developer portal. A scheduled batch, run daily or weekly to match your billing cycle, lets office staff finalise the day’s entries first and gives the workflow a natural point to summarise results rather than firing a notification per entry.

Add Monitoring So Failures Do Not Hide

At the end of each batch, use a Slack or Email node to report how many invoices were created and how many entries were routed to the needs review queue. Keep this separate from n8n’s own error workflow, which should be attached at the workflow level to catch node level failures like an expired credential or an API timeout. The review queue catches business logic problems, unapproved time and unmapped projects, while the error workflow catches technical ones, and conflating the two makes failures harder to diagnose.

Workflow diagram showing the Clockify trigger through to QuickBooks invoice creation, with an approval gate branching to a review queue Clockify Trigger New time entry Normalise and Transform Round hours, trim project key Approved and mapped? Yes QuickBooks Create Invoice Idempotency check on entry ID Slack Email Batch Summary Invoices created this run No Needs Review Queue Unapproved or unmapped Notify Admin Manual correction required
The approval gate splits the workflow into an invoiced path and a reviewed path, rather than invoicing everything by default

Advanced Configuration and Best Practices

Once the workflow is stable, treat it as software, not a one off setup task. Export the workflow JSON and keep it in a git repository, so a change to a rate mapping or a customer ID does not overwrite logic someone else is relying on, and so you can diff exactly what changed before a failed run. n8n’s documentation covers self hosted deployment and environment options if you need to run separate development and production instances rather than editing a live workflow directly.

Segment workflows by client or region once volume grows past a handful of sites. A single workflow handling every project means a bad mapping entry for one client can block the batch for everyone; separate workflows, or separate branches with independent error handling, contain the blast radius of a single misconfiguration to one client’s invoices rather than the whole run.

Rate structures should live in the mapping table, not in the Function node code, so office staff can update a labourer’s rate without anyone touching workflow logic. Keep QuickBooks credentials scoped to the minimum permissions the integration actually needs, and remember that time entries carry employee names and sometimes location data, which counts as personal data under UK GDPR; the ICO’s guidance for organisations is the right starting point if you are unsure what your retention and access obligations are for that data once it sits inside n8n’s execution logs.

Common Issues and How to Fix Them

QuickBooks Online OAuth refresh tokens expire after a fixed period of inactivity, as documented in Intuit’s developer portal. A workflow that runs daily refreshes the token as a side effect of every run and rarely hits this, but a workflow tied to a seasonal site that goes quiet for a stretch can come back to find the stored token has expired, and every run fails at the authentication step until someone manually re-authorises the connection. Add a monthly calendar reminder to re-check dormant workflows if any of your sites pause seasonally.

Duplicate invoices are almost always a retry problem, not a logic problem: a run fails partway through, gets requeued, and creates a second invoice for entries the first attempt already processed. The idempotency check described earlier, searching for an existing invoice referencing the same Clockify entry ID before creating a new one, is the fix, and it should be treated as mandatory rather than optional for any workflow that has automatic retries enabled.

Mapping drift is the other recurring failure. If a supervisor renames a project in Clockify without updating the mapping table, every entry against that project routes to the review queue rather than failing silently, which is exactly the point of the approval gate covered earlier. Resolve it by updating the mapping table, not by adding another normalisation rule to the Function node; the table is meant to be the single place non technical staff maintain, and pushing exceptions into code defeats that.

Finally, contractors working under the Construction Industry Scheme need to check that subcontractor payments and CIS deductions are handled correctly wherever this automation intersects with payments to subcontractors rather than direct labour, since CIS has its own reporting obligations separate from standard VAT treatment.

Alternative Integration Approaches

Zapier and Make cover the same ground and are faster to get a first version running, but their per task pricing gets expensive at real construction volume, and building the kind of conditional logic this workflow needs, an approval gate, a mapping lookup, and a VAT code decision, is more awkward in their linear step builders than in n8n’s branching canvas.

Custom code against both APIs directly, run as a serverless function on something like AWS Lambda, gives the most control and the lowest latency, but it needs an engineer to maintain it, and most RevOps or admin teams in construction do not have one on staff full time. That tradeoff, control against maintenance burden, is the real decision, not raw execution speed.

Bundled connectors from the QuickBooks App Store handle basic sync but rarely support the field level mapping and approval gating this guide covers, and several charge per transaction, which adds up quickly once every approved time entry is a billed event. n8n sits in the middle: enough conditional logic to handle real construction billing rules, without requiring a dedicated engineering team to keep it running.

Frequently Asked Questions

Do I need Clockify’s paid plan to get real time syncing with a webhook trigger?

Webhook support depends on your Clockify plan, so check this before designing around it. A polling trigger on an interval works on any plan and is usually the better choice for invoicing anyway, since it lets you batch and review entries rather than invoicing the instant someone logs time.

How do I stop the workflow creating duplicate QuickBooks invoices when a run is retried?

Write the source Clockify entry ID into the invoice’s DocNumber or a private note, and have the QuickBooks node search for an existing invoice with that reference before creating a new one. This idempotency check should be treated as mandatory for any workflow with automatic retries enabled.

How does the VAT domestic reverse charge for construction affect this automation?

Many subcontractor invoices in the building trade fall under HMRC’s VAT domestic reverse charge for construction services, which changes who accounts for the VAT on the line. The QuickBooks invoice node needs to set the correct tax code automatically per item rather than defaulting to standard VAT, or your accounts team ends up correcting every invoice by hand.

What happens if the QuickBooks OAuth token expires?

QuickBooks Online refresh tokens expire after a period of inactivity. A workflow that runs regularly refreshes the token as a side effect of each run and rarely hits this, but a workflow tied to a dormant site can find the token expired when it starts again, and every run fails at authentication until someone manually re-authorises the connection.

Should invoices be generated in real time or on a schedule?

Scheduled batch runs, daily or weekly to match your billing cycle, are usually better than real time invoicing. Real time triggers create a flood of tiny invoices and add unnecessary load against QuickBooks Online’s API request limits, while a batch run lets office staff finalise the day’s entries first.

If your team is losing billing hours to manual reconciliation between Clockify and QuickBooks, Equanax builds and supports RevOps automation like this for construction and field service businesses, from initial workflow design through to monitoring and handover.

For more on this, see our automation and n8n coverage, including End to End RevOps Playbook: Automate, Scale & Optimize SaaS Growth, Migrating from n8n to Cloudflare Durable Workflows, and Best RevOps Workflow Tools & Automation Strategies for SaaS Growth in 2026.

Book your free AI audit


Leave a Reply

Discover more from Equanax

Subscribe now to keep reading and get access to the full archive.

Continue reading