Skip to Content
sdeck docs

Triggers

Start workflows when something happens.

Triggers start workflows when something happens:

const doorbell = plugin.trigger({
  id: "ring",
  name: "When the doorbell rings",
  subscribe: ({ fire }) => bell.on("ring", (who) => fire({ who })),
});

fire(event) starts the workflow; its steps see the payload as event. A trigger can have settings too, which subscribe receives.