Automated Project Billing: Clockify Time Entries to Xero Invoices (Zapier)

Eliminate manual data entry by automatically converting billable Clockify hours into professional Xero draft invoices.

Tools: ClockifyXero

Platform: Zapier

Short Answer

A seamless, hands-off workflow where every 'New Time Entry' in Clockify is formatted and synced to Xero as a Draft Invoice line item, ensuring 100% billing accuracy and faster payment cycles.

The Problem

Manual reconciliation between time-tracking software and accounting platforms often leads to billing leakage and administrative burnout. Missing a single entry or miscalculating decimal hours during manual transfer can result in lost revenue or client disputes.

The Outcome

A seamless, hands-off workflow where every 'New Time Entry' in Clockify is formatted and synced to Xero as a Draft Invoice line item, ensuring 100% billing accuracy and faster payment cycles.

Step-by-Step Guide

1. **Log in to Zapier**: Click 'Create Zap' and name it 'Clockify Time to Xero Invoice'. 2. **Set Trigger**: Choose **Clockify** as the app and 'New Time Entry' as the event. Connect your account using your Clockify API Key (found in Profile Settings). 3. **Test Trigger**: Select a workspace and fetch a recent time entry to use as sample data. Ensure the entry has a 'Duration' and 'Project' name. 4. **Add Formatter Step**: Add **Formatter by Zapier (Numbers)** as step 2. Choose 'Spreadsheet-Style Formula'. Enter `{{duration_in_seconds}} / 3600` to convert Clockify's raw seconds into Xero's required decimal format (e.g., 5400s becomes 1.5hrs). 5. **Add Search Step**: Add **Xero** as step 3. Choose 'Find Contact'. Map the Clockify 'Client Name' to the Xero 'Name' field. Check the box 'Create Xero Contact if it doesn't exist yet' to prevent errors for new clients. 6. **Add Filter Step**: Add **Filter by Zapier**. Set the logic to: 'Billable' (from Clockify) 'Boolean is True'. This prevents internal non-billable tasks from cluttering Xero. 7. **Add Action Step**: Add **Xero** as step 5. Choose 'Create Sales Invoice'. Set 'Status' to 'Draft' and 'Type' to 'Accounts Receivable'. 8. **Map Invoice Data**: Map the Contact ID from step 5. In the Line Items, map the Clockify 'Description' to 'Description', and the Formatted Decimal Output from step 2 to 'Quantity'. Use a static 'Account Code' (e.g., 200 - Sales). 9. **Prevent Duplicates**: Add an 'Invoice Number' prefix like 'CLK-' followed by the Clockify 'Time Entry ID' to ensure Zapier doesn't create the same entry twice if the Zap re-runs. 10. **Error Handling**: Click the gear icon on the Xero step and select **'Add Step Level Error Handling'**. If the step fails (e.g., Xero API is down), set it to 'Retry' or send an 'Alert via Zapier Manager'. 11. **Turn on Zap**: Publish the Zap and perform a live test by stopping a timer in Clockify.

Data Mapping

| Clockify Field | Zapier Transformation | Xero Field | Requirement | | :--- | :--- | :--- | :--- | | **Client Name** | None (Direct Map) | Contact Name | Required | | **Time Entry ID** | Prefix with 'CLK-' | Invoice Number/Ref | Required (Deduping) | | **Duration (Seconds)** | `{{seconds}} / 3600` | Quantity (Decimal) | Required | | **Entry Description** | None | Line Item Description | Optional | | **Hourly Rate** | Use project default if null | Unit Amount | Required | | **Project Name** | Map to Tracking Category | Tracking Item | Optional |

Gotchas & Failure Modes

* **The Decimal Dilemma**: Clockify provides duration in seconds. Mapping this directly to Xero Quantity results in massive overbilling (e.g., 1 hour = 3600 in Xero). Always use a Formatter step to divide by 3600. * **Xero API Rate Limits**: Xero allows 60 calls per minute. If you stop 100 timers simultaneously via a bulk edit, Zapier may throttle. Enable 'Autoreplay' in Zapier settings to handle 429 errors. * **Draft vs. Authorised**: This Zap creates 'Draft' invoices. You must still log into Xero to approve and send them. Do not set to 'Authorised' automatically unless you have a robust validation step. * **Matching Precision**: Xero Contact search is case-sensitive. Ensure Client names in Clockify strictly match your Xero Contact list to avoid duplicate contact creation.

Verification Checklist

- [ ] **Sample Data Check**: Did the Clockify trigger pull the `duration_in_seconds` field? - [ ] **Math Check**: Does the Formatter output `1.0` for a 3600-second entry? - [ ] **Search Check**: Does the 'Find Contact' step correctly locate an existing customer? - [ ] **Invoice Check**: Open Xero > Business > Invoices > Draft. Is the 'CLK-' prefixed invoice there with the correct hour decimal? - [ ] **Task History Check**: Check Zapier Task History to ensure no 'Step Level' errors occurred during the test run.

Ready to Automate?

Build this automation with Zapier in minutes.