Skip to main content
Some work starts somewhere else: a support ticket someone tagged for an agent, an alert, a form someone filled in. A hook gives that system an address to call, and each call becomes a card in your project, with your instructions on it and everything the call sent.

What a hook is

A hook is a name, a secret address, and the card it writes: an area, labels, the status the card starts in, and your instructions to whoever picks it up. Whatever the other system sends goes on the card in full, under your instructions, so nothing is lost. Witness doesn’t expect any particular shape. Two optional fields take values from the call. Title and Link are text where {path} stands for a field in what was sent. A GitHub issue event carries the issue under issue, so a title of {issue.title} takes the issue’s title, and a link of {issue.html_url} points at the issue. A path the call doesn’t have is left empty, and the card is still made. The card is written by witness, held by nobody, and says which hook it came from. When the hook has a Link, a later call with the same link adds to the open card instead of making another, so a ticket that changes stays one card while that card is open. The same call sent again soon after, as a system does when it retries, adds nothing, even if the card has closed in between.

Making one

Hooks are in Settings → Hooks. Press New hook, give it a name, choose the area and what its cards are Born in, write the Instructions, and press Create hook. Copy the Address into the other system as where it sends, with POST. Then send one test call. The hook’s page shows the Last call with the fields it held, so you can write Title and Link from a real example rather than from the other system’s documentation. Saving changes the next card and none already made. Each hook has its own switch to stop it taking calls without losing it. New address replaces the address when the old one may have leaked; the old one stops working at once. Deleting a hook stops its address and leaves the cards it made in place. In GitHub, add the address under the repository’s Settings → Webhooks, set the content type to application/json, and choose the issue events. GitHub sends a ping when the webhook is saved, which makes a first card and doubles as the test call. In Zendesk, choosing which tickets go to an agent is the trigger’s job: a trigger on a tag or a view, with a webhook action pointing at the hook’s address. The trigger’s body is where you choose what Zendesk sends. If the agent can’t open Zendesk itself, send what it needs to act on, such as the ticket’s subject and the customer’s message, not only its id.

Who can set one

The address lets whoever holds it make cards in the project, and nothing else. So setting a hook is a member’s, on the page. Anyone who can open the project can see its hooks, but only a member sees an address. A share link cannot set one. Whose name goes on a write →

In witness for Mac

Each open card from a hook that nobody has picked up yet shows in the tray at the foot of the page with Start a session, as a scheduled card does. The app never starts one by itself. Sessions →