bitsplitters/tasks

/config webhook

Fire an HTTP call when a task is completed or reopened — connect TTM to anything.

Webhooks let a task talk to the outside world. Associate one with a task and, when that task is completed or reopened, TTM sends an HTTP request you defined — to a CI system, a chat, a spreadsheet automation, anything that accepts a call.

Creating a webhook

/config webhook

The command takes a few options:

OptionRequired?ValuesNotes
actionRequiredview · create · modify · deleteWhat you want to do.
webhookRequireda nameThe webhook to act on, up to 100 characters.
triggerOptionalcompletion · reopenOmit it to act on both directions at once.

Choosing create (or modify) opens a form with four fields:

A webhook is really a pair of actions — one for completion, one for reopen — under a single name. That’s what the trigger picks.

The trigger is optional on purpose
Omit it and one command covers both directions: create sets up completion and reopen with the same configuration (the {{state}} and {{when}} tokens tell the two events apart), view prints both, and delete removes the webhook entirely, with all its actions. Modify pre-fills from the completion action and overwrites both.

Webhooks are a Premium feature — the Free plan has none, and during the beta they are unlocked for everyone. Each server can keep up to 25 webhooks. Reached the ceiling? Delete one you no longer use — TTM lists them all in the error.

Tokens

Inside the URL, headers and body you can drop {{ }} tokens that TTM replaces at send time.

Built-in tokens

TokenValue
{{task}}The task text
{{state}}State — completed or reopened
{{list}}The list title
{{user}} / {{user_id}}Name / id of whoever toggled the task
{{when}}Date and time (ISO-8601)
{{guild}} / {{guild_id}}Server name / id
{{channel}} / {{channel_id}}Channel name / id

Free variables — define {{key=value}} anywhere in a task’s text and reference {{key}} in the webhook. Unknown tokens simply resolve to an empty string.

Associating a webhook with a task

Creating a webhook doesn’t wire it to anything yet. Open the list, click Webhook on the second button row until it turns blue, pick the webhook from the selector and then the task. From then on, completing or reopening that task fires the call. Click Webhook until it turns red and pick the task to remove the association.

The association is stored in the task itself, as a reserved token: in Bulk update you’ll see it in front of the task text.

- [] {{wb=deploy}} Ship the release notes

You can move it, copy it onto another task or delete it by hand, exactly like a mention — the token never shows up in the rendered list, and wb is the only reserved key (every other {{key=value}} is a free variable, see below).

When a webhook fires

A webhook fires when someone checks or unchecks its task from the list’s check selector — and only then:

Example

A POST that announces a completion:

Method: POST
URL:     https://example.com/hooks/ttm
Headers: Content-Type: application/json
Body:
{
  "text": "{{user}} {{state}} \"{{task}}\" in {{list}}",
  "at": "{{when}}"
}

Security

For everyone’s safety, TTM only accepts public https URLs. Internal or non-routable destinations — localhost, private IP ranges, link-local addresses — are blocked. The body must be valid JSON, and every header line must follow the Key: value format.