# Clockify

:::tip Available
This integration is active and ready to use on all Pro plans.
:::

Connect Clockify to Frihet. Import your logged hours and convert time into invoices.

## What is it for?

With Clockify integrated:

-   **Import hours** — Bring your time entries into Frihet
-   **Create automatic invoices** — Convert time into money
-   **By project or client** — Group as needed
-   **Flexible rates** — Define price/hour per client or project

## Requirements

-   **Active Clockify account** — With logged hours
-   **Clockify API Key** — For authentication
-   **Frihet Pro or higher**

## Get your Clockify API Key

### Step 1: Open Clockify

1.  Go to [app.clockify.me](https://app.clockify.me)
2.  Log in
3.  In the upper right corner, click on the **gear icon** (Settings)

### Step 2: Find your API Key

1.  In **Settings**, go to **Account**
2.  Look for the **"API"** section
3.  You will see your **API Key** (a long token)
4.  Click on **"Copy"** to copy
5.  **Store this token in a safe place** (do not share it)

## Connect Clockify to Frihet

### Step 1: Open Frihet

1.  Go to **Settings** → **Integrations**
2.  Find **Clockify**
3.  Click on **Connect**

### Step 2: Enter API Key

1.  Paste the Clockify token
2.  Click on **Verify connection**
3.  If successful: "✅ Connected"

### Step 3: Configure projects

1.  Choose **which projects to import**:
    -   All projects ✅
    -   Only specific projects ⚪

2.  Set **default rate**:
    -   Example: €55/hour
    -   Changeable per client later

3.  Save

## Import hours

### Manual import

1.  Go to **Invoicing** → **Import from Clockify**
2.  Select date range:
    -   "This month"
    -   "Last 2 weeks"
    -   "Custom"
3.  Choose projects
4.  Click on **"Import"**
5.  Invoices are created in **"Draft"** status

### Automatic synchronization

If you enable it:

1.  Each night, Frihet automatically imports your hours
2.  Groups by client/project
3.  Creates invoice drafts
4.  You confirm when ready

## Practical example

### In Clockify

```
Proyecto: Sitio Web
Cliente: Empresa ABC
- Lunes 3 feb: 6 horas (Desarrollo frontend)
- Miércoles 5 feb: 4 horas (Backend)
Total: 10 horas

Proyecto: Consultoría
Cliente: Juan Martínez
- Jueves 6 feb: 3 horas (Auditoría)
Total: 3 horas
```

### In Frihet (after importing)

**Invoice #1001 - Empresa ABC**
```
Concept: Website Development
- 6h (frontend) @ €55 = €330
- 4h (backend) @ €55 = €220
Subtotal: €550
Tax (21%): €115,50
Total: €665,50

Details:
- 3 Feb: 6h Frontend development
- 5 Feb: 4h Backend
```

**Invoice #1002 - Juan Martínez**
```
Concept: Technical Audit
- 3h @ €55 = €165
Subtotal: €165
Tax (21%): €34,65
Total: €199,65

Details:
- 6 Feb: 3h Audit
```

## Custom rates

### By client

1.  Go to **Clients** → open client
2.  In **"Clockify Rate"**, enter your rate
3.  Future imports will use that rate

**Example:**
```
Empresa ABC: €75/h (cliente importante)
Juan Martínez: €55/h (tarifa estándar)
```

### By project

Edit the invoice before confirming:

1.  It's imported with the default rate
2.  You manually change the rate
3.  It recalculates automatically

## Group hours

### By project

If you have multiple projects for the same client:

1.  You import "Project A" → Separate invoice
2.  You import "Project B" → Separate invoice
3.  Or combine both into one invoice

### By period

```
Semana 1 (1-7 feb) → Factura semanal
Semana 2 (8-14 feb) → Otra factura
```

Or group the entire month into one large invoice.

## Task descriptions

If you use **task descriptions** in Clockify:

```
Clockify:
- 09:00-11:00 "Diseño mockups" (2h)
- 13:00-15:30 "Integración API" (2.5h)
```

Frihet imports:
```
Invoice:
- Mockup design: 2h @ €55 = €110
- API integration: 2.5h @ €55 = €137.50
Total: €247.50
```

Each line is editable before confirming.

## Project and client mapping

### Automatic

Clockify: "Client XYZ" → Frihet: Client "Client XYZ"

If it doesn't exist, Frihet creates it.

### Manual

To map a project to another client:

1.  **Settings** → **Integrations** → **Clockify** → **Mapping**
2.  For each project, assign a Frihet client
3.  Save

**Example:**
```
Proyecto Clockify "App Q1"
→ Asignar a cliente Frihet "Startup Tech"
```

## Configure automatic synchronization

If you want it to import automatically every night:

1.  Go to **Settings** → **Integrations** → **Clockify**
2.  Enable **"Automatic synchronization"**
3.  Choose synchronization time (recommended: 11pm)
4.  Save

Every night:
-   Frihet imports your hours
-   Creates invoice drafts
-   You confirm when you want

## Test the integration

### Test import

1.  In Clockify, log an entry: "Test entry" (1h)
2.  In Frihet, **Invoicing** → **Import from Clockify**
3.  Choose **"Last 24 hours"**
4.  Click on **"Import"**
5.  You should see an invoice draft

If it doesn't work:

-   Verify that Clockify is connected ✅
-   Hours must be "completed" (not paused)
-   Wait 5 minutes
-   Reload Frihet (F5)

## Edits after importing

The invoice arrives in **"Draft"** status. You can:

-   ✏️ Edit concept
-   ✏️ Change rate/hour
-   ✏️ Add/remove lines
-   ✏️ Change client
-   ✏️ Adjust tax

Changes in Clockify **do not affect** the Frihet invoice.

### Import time entries

Frihet can automatically convert your time entries into invoice lines:

1.  Connect your Clockify account
2.  Go to the **Data** tab of the integration
3.  Click on **Import time entries**
4.  Enter your hourly rate
5.  Frihet groups the entries by project and creates an invoice draft

Entries are grouped by project, summing the total hours and applying the indicated rate.

## Comparison: Clockify vs Toggl

| Feature             | Clockify          | Toggl             |
| :------------------ | :---------------- | :---------------- |
| **API**             | Sí ✅             | Sí ✅             |
| **Rate/hour**       | €55 recomendado   | €60 recomendado   |
| **Task description** | Sí                | Sí                |
| **Teams**           | Sí                | Sí                |
| **Cost**            | Gratuito o €99/año | Gratuito o €108/año |

**Recommendation:** Use the one you already have. Both work equally well with Frihet.

## Limitations

-   **Maximum 90 days per import** (to avoid overload)
-   **No bidirectional synchronization** — Only Clockify → Frihet
-   **API Key valid indefinitely** — Until you revoke it

## Troubleshooting

### "Does not connect with Clockify"

-   Verify that the token is correct (copy it again)
-   Confirm that your Clockify account is active
-   Try disconnecting and reconnecting

### "I see hours in Clockify but not in Frihet"

-   Hours must be "completed", not paused
-   Clockify updates data every 24h, Frihet synchronizes every 15 minutes
-   Reload Frihet

### "Can I switch from Toggl to Clockify?"

Yes. The steps:

1.  Disconnect Toggl: **Settings** → **Integrations** → **Toggl** → **Disconnect**
2.  Connect Clockify: **Settings** → **Integrations** → **Clockify** → **Connect**
3.  Already created invoices remain the same

### "Do I import 6 months of history?"

Yes, but in multiple imports:

1.  Import 3 months (e.g., January-March)
2.  Confirm the invoices
3.  Import another 3 months
4.  This way the history is not mixed up

## Next steps

-   [Automate with n8n](./n8n)
-   [Connect your bank for reconciliation](./revolut)

---

**Previous:** [Toggl Track](./toggl)
