Skip to content

Webhooks or notifications?

View as Markdown

Ligament has two ways to tell the outside world that something happened. They look alike (both can end up in Slack), but they’re built for different readers.

Notifications Hooks, callbacks and automations
For People Other systems
Who decides where it goes Each person, in their preferences, within the defaults an admin sets You, in code or in an automation
Channels In-app, email, browser push, Slack, Teams, SMS, WhatsApp, connected apps Any HTTP endpoint
Content Written for each person: only what they may see, short by default, with a link Whatever your automation or script sends
Buttons Approve and Reject, checked as the person who pressed None: the receiving system decides what to do
Delivery Retried with backoff, held during quiet hours, rate limited, logged per message A workflow step: retried by the workflow engine, logged in the run
Set up in Settings › Notifications Workflows, scripts and hooks
  • a person has to do something: approve a request, pick up an assignment, answer a comment;
  • the message must respect what the reader may see. A notification about an employee never shows a field the reader can’t open in the app;
  • people should choose for themselves how they hear about it, and when not to be disturbed.

A team channel (an admin rule that posts every SLA breach to a Slack channel, say) is still a notification: it’s for the people in that channel, so it says only which record and links to it.

  • another system needs the data: a ticket in another tool, a row in a warehouse, a message to a partner’s API;
  • you need the full record, in a format you choose;
  • the receiver isn’t a person and won’t press a button.

Ligament doesn’t send general-purpose outbound webhooks for record changes. To push a change to another system, use an automation that starts on the record event, and call out from it. To learn when a workflow run you started finishes, use a run callback. To receive calls, expose a script as an inbound hook.

An automation that calls another system sends exactly what you put in it, with no per-reader filtering. Don’t put field values in it, or post them into a channel people read, unless everyone who gets them may see them. A workflow’s notify step (ctx.notify) is different: it’s a notification, so preferences, quiet hours, per-reader redaction and the delivery log apply. See Notify from a workflow.