Skip to main content

How Do Webhooks for Time Entries Work?

A webhook sends a message to your own URL the moment a time entry changes. Here is what arrives, how to verify it, and what to do when delivery fails.

← Back to Blog
3 min read · by Tracking Tabs

A webhook is a message your time tracker sends to a URL you control whenever an entry is created, updated or deleted. Your server receives the event, checks its signature, and acts on it, for example by copying the entry into a spreadsheet or posting to a chat channel. Nothing has to poll for changes.

Say a contractor wants every finished time entry to show up in a client's project sheet without anyone copying numbers across on Friday. One way is a script that asks the time tracker for new entries every few minutes. Another is to have the tracker tell the script the instant an entry is saved. That second way is a webhook.

What is a webhook, in plain terms?

It is an ordinary web request that goes the opposite direction from the usual one. Normally your code calls the tracker. With a webhook, the tracker calls you. You give it a URL, it remembers the URL, and when something happens it sends a small package of data to that address.

For time entries, the events are the obvious three: an entry was created, an entry was updated, an entry was deleted. Each delivery says which of those happened and carries the entry it happened to, so your receiver can work out what to do without asking anything back.

What does your receiving end have to do?

Four things, in this order.

  1. Accept the request at a public HTTPS address and read the raw body before parsing it.
  2. Verify the signature. Tracking Tabs signs each delivery with HMAC-SHA256 using a secret only you and the tracker know. Recompute the signature from the raw body, compare, and drop anything that does not match.
  3. Answer quickly with a success status. Do the slow work, like writing to a database or calling another service, after you have responded, or hand it to a queue.
  4. Do the actual thing: update a sheet, post a message, mark something paid.

The signature step is the one people skip when they are testing and then forget to add. A webhook URL is just a web address. Anyone who guesses it can post fake events to it, and an unsigned receiver would believe them.

Why would a delivery fail, and what then?

Mostly for dull reasons: your server restarted, a certificate expired, a deploy took the endpoint down for a minute, or the handler took too long and the request timed out. The tracker does not give up on the first miss. In Tracking Tabs a failed delivery is retried up to six times, and after that the event is not sent again.

Six tries covers a short outage. It does not cover a long one. If your receiver was down all weekend, plan on catching up another way, such as a scheduled job that pulls the last day of entries through the REST API and fills in anything the webhook missed. Treat the webhook as the fast path and the pull as the safety net. The same receiver should also tolerate seeing an event twice, since retries and catch-up jobs can overlap. Keying your writes on the entry's id makes a repeat harmless.

There is a test-delivery button in the app. Use it before you trust anything. It sends a sample event to your URL so you can see whether your signature check passes and what your handler does with the payload, without anyone having to track real time to find out.

Where are webhooks actually useful?

The honest answer is: small, boring automations that save a few minutes a week each.

  • Copying each finished entry into a spreadsheet a client or partner already watches.
  • Posting to a chat channel when someone logs time against a particular project.
  • Updating an internal dashboard so hours worked sit next to a project's status.
  • Writing a second copy of every entry to storage you control.
  • Noticing deletions. If entries on a billed project are removed, you may want to hear about it the same day.

For ideas that need more than reacting to events, such as pulling a month of data or creating entries from another system, you want the API instead. What you can build with a time tracking API covers that side.

Do you need them?

Often not. If your only goal is a weekly look at where hours went, a saved report does that with no code at all; how to read a time report is the place to start. If you want data in a spreadsheet once a month, an export is faster to set up than a receiver you then have to host and keep alive. Webhooks pay off when something should happen right away, or when you do not want a person to remember to do it.

In Tracking Tabs, webhooks come with the Team plan and above. Solo workspaces can get at the same data through the REST API by asking on a schedule, which is slower but needs no public URL.

Common questions

What is the difference between a webhook and polling an API?
Polling means your code asks, over and over, whether anything changed. A webhook flips it: the tracker tells you when something changes. Webhooks arrive sooner and waste fewer requests, but you need a public URL that can receive them. Polling works from anywhere, including a laptop.
How do I know a webhook really came from my time tracker?
Check the signature. Each delivery is signed with a shared secret, and your receiver recomputes the signature from the raw request body and compares it. If they do not match, discard the request. Never trust a payload just because it reached your URL.
What happens if my server is down when a webhook fires?
Delivery is retried. In Tracking Tabs a failed delivery is attempted up to six times. If your endpoint is still unreachable after that, the event is not delivered, so build a way to catch up, such as a nightly pull through the API.
Can I use webhooks on the free plan?
Not in Tracking Tabs. Webhooks are part of the Team plan and above. Solo and Free workspaces can still reach the same data through the REST API (Solo and above) by asking for it on a schedule.
Share this article