bitsplitters / tasks

Webhooks

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:

OptionValuesNotes
actionview · create · modify · deleteWhat you want to do. Required.
webhooka nameThe webhook to act on. Required.
triggercompletion · reopenOptional. Omit it to act on both directions at once.

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

The trigger is optional on purpose
Omit it and create sets up both completion and reopen with the same configuration — the {{state}} and {{when}} tokens tell the two events apart. Modify pre-fills from the completion action and overwrites both.

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, use the Webhook control on the second button row (or the 🔗 control on the task) and pick the webhook. From then on, completing or reopening that task fires the call.

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.