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.