Skip to content
Docs

Triggers & arming

A trigger starts a flow. Everything Publicus does unattended happens because a trigger fired: a schedule ticked, an HTTP request arrived, a message came in over a socket, an email landed in a mailbox. This page explains how triggers fit into the flow graph, how arming works and what the canvas badge tells you, which version of the flow a triggered run executes, and how to replay traffic that has already arrived.

The node picker groups triggers on their own shelf, “Triggers — start the flow”. These are the ones you reach for most:

Node Starts the flow when
Schedule a recurring cron schedule ticks. See Schedule flows.
Webhook an inbound HTTP request hits a webhook you have created. See Receive webhooks.
Chat a chat message is posted to a webhook. Each request becomes a turn in a conversation thread.
Gateway a message is sent to a Discord or Slack bot under Chat apps, whose gateway or Socket Mode connection Publicus holds open for you. See Conversational channels.
Email Trigger an email arrives in a connected mailbox or a Publicus inbox. See Connect a mailbox and the Email Trigger node.
When a Run Finishes a run of another flow completes, fails or is stopped, or a run of any flow in the workspace when you leave its flow empty. See the When a Run Finishes node.

One node is deliberately missing from that shelf: Start, the entry point every flow already has. The next section explains the relationship.

Every flow contains a Start node. It is the flow’s entry point: it carries the run’s start payload and performs no work of its own. Manual runs enter through it directly, and so does every run started by another flow through a connector, by an agent invoking the flow as a tool, or through the API.

The trigger nodes do not replace Start. They sit in front of it and wire into it: each trigger node’s outgoing handle connects to Start’s trigger handle. When the trigger fires, the run starts at Start and continues into the rest of the graph; the trigger node itself is not one of the run’s steps, it decides when a run starts and what the start data is.

A flow canvas where a Webhook node and a Schedule node both wire into Start's trigger handle, their trigger badges reading On and On · never
A flow canvas where a Webhook node and a Schedule node both wire into Start's trigger handle, their trigger badges reading On and On · never

Two things follow from that shape:

  • A flow can have more than one trigger. Start’s trigger handle accepts several connections, so one flow can carry both a Schedule and a Webhook, each armed independently.
  • An inbound trigger that is not wired into Start can never start anything. Inbound traffic that reaches an armed but unwired Webhook, Chat, Gateway, or Email Trigger is skipped, and a receipt is recorded on the traffic log so you can see why nothing ran. Schedule is the exception: it is dispatched by arming alone, so an armed Schedule starts runs on every tick even when the node is left unwired.

Whatever the trigger received becomes the run’s start data, which downstream nodes read through the $start expression root. Webhook and Email Trigger place the body under $start->payload (the parsed email carries from, to, subject, text, html and attachment metadata there):

{{ $start->payload->subject }}

A Chat request carries its turn in the body, under $start->payload: a message, an optional threadId, and optional metadata. Send the same threadId on every follow-up request to land the messages in one conversation. Gateway passes the channel message straight through as start data. Schedule has nothing to pass: its start data is empty, so scheduled flows reach for key-value entries or other stored state instead. See Expressions for the grammar.

A trigger does nothing until you arm it. Every trigger node carries a badge on the canvas that tells you whether it fires:

Badge Meaning
Off Switched off, so it starts no runs. A form page whose trigger is off tells visitors it is not taking answers at the moment, and the portal buttons that start its flow are hidden.
On Switched on. It starts the flow on its schedule, or when something reaches it.
A Schedule node whose trigger badge reads Off
A Schedule node whose trigger badge reads Off
A Webhook node whose trigger badge reads On
A Webhook node whose trigger badge reads On

The badge does not say which version of the flow a trigger runs. The version note on the flow toolbar says that, once for the whole flow. It also warns you when a trigger that is on runs the draft because the flow has never been published, and when you added a trigger after the live version was published. See Draft, publish & versions.

A flow's title with the version note on two lines: Not published · its trigger runs the draft, so every saved edit is live
A flow's title with the version note on two lines: Not published · its trigger runs the draft, so every saved edit is live
A flow's title with the version note on two lines: A trigger was added after v1, which still runs · publish to match
A flow's title with the version note on two lines: A trigger was added after v1, which still runs · publish to match

The badge appends a second part only when it has something to say:

  • · never means the trigger is armed but has never started a run. Either nothing has reached it yet, or something upstream is not delivering.
  • · late (schedules) means two of its scheduled times have passed since the last run. The schedule is not keeping up, or not running at all. A schedule that is on and has never run keeps · never instead.
  • · in 4h (schedules) counts down to the next tick when nothing is wrong.
A Schedule node that is on but has never started a run, its badge reading On · never
A Schedule node that is on but has never started a run, its badge reading On · never
A Schedule node that has missed two of its scheduled times, its badge reading On · late
A Schedule node that has missed two of its scheduled times, its badge reading On · late
A Schedule node whose badge counts down to the next tick: On · in 30m
A Schedule node whose badge counts down to the next tick: On · in 30m

Click the badge to open Trigger controls and flip the Active toggle. The same dialog shows the next scheduled run and when the trigger last fired, with a link to that run. Schedules can also be armed and disarmed in bulk from the Schedules screen under Operations.

Trigger controls with the Active toggle switched on, the next scheduled run and when the trigger last fired
Trigger controls with the Active toggle switched on, the next scheduled run and when the trigger last fired
The Schedules screen with two flows ticked and Bulk actions open, offering Activate and Deactivate
The Schedules screen with two flows ticked and Bulk actions open, offering Activate and Deactivate

The switch takes effect at once. It is not part of the flow graph, so it does not wait for a publish, publishing does not capture it, and rolling back to an earlier version does not change it. That is deliberate: turning a trigger off is something you may need to do immediately, and rolling back to fix a bad release must not silently restart something you switched off.

For the same reason, an imported flow always arrives with every trigger off, whatever the file claims. Arm its triggers yourself once you have checked where they point.

Triggered runs and manual runs deliberately read different definitions of the flow:

  • Every triggered entry point (schedules, webhooks, chat, channels, mailboxes, agent and MCP invocations) executes the flow’s published version. You can keep editing the draft without touching what runs in production.

  • Run by hand, the button on the flow page, is the one exception: it runs the draft on the canvas unless you choose the live version, so you can exercise an edit before publishing it.

    The flow page header buttons Edit with AI, Run by hand and Runs
    The flow page header buttons Edit with AI, Run by hand and Runs
  • A flow that has never been published has no version to fall back on, so triggered runs execute the draft. Once a trigger is on, the version note on the toolbar reads Not published · its trigger runs the draft, so every saved edit is live. This is the state every imported and template-provisioned flow starts in; publish once to separate what you edit from what runs.

Each run freezes the definition it started with, and the run report records which version that was. See Draft, publish & versions for the full model.

Publicus stores what crossed the boundary, and stored traffic can be dispatched again. Every inbound transport keeps a log: webhook calls on the webhook, emails on the mailbox, socket messages on the Discord or Slack bot, all visible together on the Traffic screen under Operations.

Each stored entry carries a Re-trigger action on its transport’s own page (the webhook’s requests, the mailbox’s messages, the bot’s received frames) that dispatches the payload again exactly as it was received. Before it runs, you choose what it runs against:

  • The published version, what real inbound traffic runs.
  • The draft being edited, which lets you exercise unpublished edits against a genuine payload, a real Slack envelope or a real email with its attachments, without asking anyone to send it again.
Re-trigger this webhook call, asking whether to run it against the published version or the draft being edited
Re-trigger this webhook call, asking whether to run it against the published version or the draft being edited

Either way the run is real and repeats its side effects. Re-trigger is refused once the stored payload has passed its content window, because the promise is “exactly as received” and an expired payload is a placeholder.

A finished run offers a related action: Re-run on the run report starts a new run of the flow with the same start data. When your draft differs from the live version, it asks which of the two to run. See Re-run a run.

The Re-run this run confirmation, saying it starts a new run of this flow with the same start data and which version runs, with Cancel and Re-run
The Re-run this run confirmation, saying it starts a new run of this flow with the same start data and which version runs, with Cancel and Re-run

Schedule, Webhook, Chat, and Email Trigger each carry a withoutOverlapping option, on by default. While a previous run of the flow is still in progress, a new tick or inbound request is skipped, not queued: nothing runs later. For inbound requests the skip is recorded on the traffic log as a receipt (overlapping execution) so you can see what was dropped and why; a skipped schedule tick leaves no receipt, since a tick is not inbound traffic.

Gateway has no overlap option. Every inbound channel message starts its own run, even while earlier runs are still in flight, because a conversation cannot afford to drop messages.

One resource can fan out to several flows: a single webhook, mailbox, or Discord or Slack bot may be bound by trigger nodes in different flows, and each inbound event starts all of them. Overlap protection applies per flow, so one busy flow skipping does not stop its siblings.

The Await node pauses a running flow until a named signal arrives. It looks trigger-shaped, and the picker gives it the same bolt icon, but it is the opposite of one: a trigger starts a run that does not exist yet, while Await suspends a run that is already underway. Reach for it when a flow needs a person’s decision partway through, given with a button on a table row, or must wait for a reply to an email it sent. See Add human approval for the agent-flavoured version of that pattern.

Situation Trigger
Run the flow on demand while iterating none needed, use Run by hand
Nightly sync, hourly poll, any cron cadence Schedule
A third-party service calls into Publicus Webhook
A chat agent that keeps conversation context over HTTP Chat
An always-on Discord or Slack bot on a live socket Gateway, see Slack and Discord
Act on incoming email Email Trigger
Alert someone, or start a repair, when any flow fails When a Run Finishes with its flow left empty
Started by another flow, an agent, or the API none needed, the run enters through Start
Pause a running flow for a human or an external event any trigger plus Await