Gateway
Gateway starts a flow when a message is sent to a Discord or Slack bot under
Chat apps that dials out: Publicus holds its
Discord gateway or Slack Socket Mode connection open for you, so no public URL
is needed. The platform’s gateway daemon maintains the socket and starts a
fresh run of every bound flow for each inbound message.
You find the node on the node picker’s Triggers — start the flow shelf;
How-to: Connect an agent to a chat channel
explains where bots that dial out fit among the channel options.
The node has a single webhook handle, which connects into Start’s trigger handle. Like every inbound trigger it starts nothing until it is wired into Start, and a frame that reaches an unwired trigger is recorded as a skip on the bot’s log. It binds the flow to one bot, which you add under Chat apps in Services; the Slack agent and Discord agent guides walk through creating one.
Configuration
Section titled “Configuration”

| Field | Type | Default | Description |
|---|---|---|---|
Bot (webSocketConnectionId) | string ✦ (required) | — | The Discord or Slack bot under Chat apps whose inbound messages start this flow. Publicus holds its gateway or Socket Mode connection open. |
Fields marked ✦ accept expressions.
Start data
Section titled “Start data”The channel message arrives as the run’s start data in a flat, normalized
shape. There is no payload wrapper:
{ "channel": "slack", "externalWorkspaceId": "T01234567", "externalConversationId": "C09876543", "externalUserId": "U0AB12CD3", "text": "What are your opening hours?", "conversationKey": "6c84fb90-12c4-5a1e-8c3d-0e5b2f7a9d41", "replyContext": {}}Read the message with {{ $start->text }}. The conversationKey is a
stable identity for the (channel, conversation, user) triple: key a
Chat Thread memory node on it and the agent keeps
one thread per conversation. replyContext carries platform-specific reply
hints for the channel send nodes.


Example
Section titled “Example”The Slack support agent template is the full
loop: a Gateway trigger bound to a Slack bot on Socket Mode, an
Agent prompted with {{ $start->text }}, and a
Chat Thread memory keyed on
{{ $start->conversationKey }}. It has no send node: the bot itself
posts the agent’s answer in the conversation the message came from. The
Discord support agent template is the same shape on a Discord bot.


Limitations
Section titled “Limitations”- Gateway has no overlap option: every inbound message starts its own run, even while earlier runs are still in flight, because a conversation cannot afford to drop messages.
- One bot can fan out to several flows: every flow with an armed Gateway node bound to it runs on each message.
- Triggered runs execute the flow’s published version; see Triggers & arming.
Related
Section titled “Related”- How-to: Connect a Slack agent and Connect a Discord agent set up the bot.
- Chat apps is where the bot lives, with its status and received frames.
- How-to: Connect an agent to a chat channel compares the channel options.
- Chat is the HTTP equivalent for building your own chat surface.
- Slack · Discord post to another channel than the one the message came from.