Guides
Zapier, Make and n8n
Automation tools start workflows from ClockLap events and act through the API. ClockLap supports REST hooks (subscribe and unsubscribe by id), sample events for building a workflow, and an auth test, on top of the usual API keys and webhooks.
Zapier#
- Make an API key
In the console, Settings → Developers → API keys. Give it
webhooks:managefor triggers, plustime:write,projects:write,work_orders:writeorpeople:writefor the actions you use. - Connect ClockLap in Zapier
Paste the key. The region is read from it (
tt_live_ca_…ortt_live_us_…); Zapier labels the connection with your workspace name. - Build
Triggers fire instantly; actions send an idempotency key, so a step Zapier retries never adds a record twice.
| Trigger | Event | Fires when |
|---|---|---|
| New time entry | time_entry.created | An entry is added by hand, on a timesheet or through the API |
| Clock in | time_entry.clocked_in | Someone clocks in (phone, kiosk, crew or console) |
| Clock out | time_entry.clocked_out | Someone clocks out |
| Timesheet approved | timesheet.approved | A manager approves a timesheet |
| Expense submitted | expense.submitted | An expense or mileage claim is submitted |
| Form submitted | form.submitted | A daily report, inspection or other form is sent |
| Work order completed | work_order.completed | A job is marked done |
| Action | Endpoint |
|---|---|
| Create time entry | POST /v1/time-entries |
| Create project | POST /v1/projects |
| Create work order | POST /v1/work-orders |
| Add person | POST /v1/users |
The Zapier app's source is in the ClockLap repository under integrations/zapier (Zapier Platform CLI): fork it to add triggers on any of the event types.
REST hooks#
Any tool can subscribe a URL to one event and get back an id to unsubscribe with. A subscription is an ordinary webhook endpoint: signed, retried, and listed in the console with the tool's name.
# Subscribe (event: a trigger key above, or any event type)
curl https://ca-api.clocklap.com/v1/hooks -H "Authorization: Bearer $CLOCKLAP_API_KEY" -H 'content-type: application/json' \
-d '{"target_url":"https://hooks.example.com/abc","event":"clock_in","source":"n8n"}'
# → 201 {"id":"whk_01…","event":"time_entry.clocked_in","source":"n8n","secret":"whsec_…"}
# Unsubscribe
curl -X DELETE https://ca-api.clocklap.com/v1/hooks/whk_01… -H "Authorization: Bearer $CLOCKLAP_API_KEY"const sub = await (await fetch('https://ca-api.clocklap.com/v1/hooks', { method: 'POST', headers: { Authorization: `Bearer ${key}`, 'content-type': 'application/json' },
body: JSON.stringify({ target_url: webhookUrl, event: 'timesheet_approved', source: 'make' }) })).json();
// keep sub.id to unsubscribe; sub.secret verifies ClockLap-Signature| Field | Notes |
|---|---|
target_url | HTTPS on the public internet |
event | A trigger key (clock_in) or an event type (time_entry.clocked_in) |
location_id | Optional: only events at this location and everything inside it |
source | zapier, make, n8n or rest_hooks; shown in the console |
Deliveries are the usual event envelope: { id, type, created_at, location_id, actor, data: { object } }. GET /v1/hooks lists subscriptions made this way.
Samples and polling#
GET /v1/hooks/samples/{event} returns the latest events of that type, newest first (up to 25 with limit), so a workflow can be built from real data and polling triggers can read the same list. With none yet, it returns one made-up example marked "sample": true.
curl -G https://ca-api.clocklap.com/v1/hooks/samples/form_submitted -H "Authorization: Bearer $CLOCKLAP_API_KEY" -d limit=3Auth test#
GET /v1/automations/me answers with the workspace (id and name), region and the triggers available. Use it as the connection test and label.
Make and n8n#
- Make
Add a Webhooks → Custom webhook module, copy its address and subscribe it (console: Settings → Developers → Zapier, Make, n8n, or
POST /v1/hooks). Use HTTP modules with your key for actions. - n8n
Add a Webhook node (POST), subscribe its production URL the same way, and use HTTP Request nodes with Header Auth (
Authorization: Bearer …). VerifyClockLap-Signaturewith the secret in a Code node if you like.
Subscriptions act with the API key's access, never more than the person who made the key. Revoking the key stops the actions; remove subscriptions in the console or with DELETE /v1/hooks/{id}.