Event Bus
Workspace-scoped async messaging — publish events from workflows or SDK artifacts, subscribe via triggers, inspect topic streams, and replay events.
The Event Bus is an internal pub/sub system for decoupled, async communication between workflows and SDK artifacts. Unlike webhooks (which deliver to external URLs), the event bus routes messages within your FlowOS workspace. Manage topics at Integrations → Events.
Topics
Topics are named channels. Publishers send messages to a topic; subscribers receive them. Topic names are free-form strings — use dotted notation for namespacing (incident.resolved, github.push, etl.batch.completed).
- •Topics are created automatically the first time a message is published to them.
- •Wildcard subscriptions: a workflow trigger set to topic
incident.*fires onincident.created,incident.resolved, etc. - •Messages are retained for 72 hours by default, extendable to 30 days on Enterprise.
- •Each message can be up to 1 MB.
Publishing Events
From a Workflow Node
Add an Emit Event node to your canvas:
{
"type": "EmitEvent",
"config": {
"topic": "incident.resolved",
"payload": {
"incidentId": "{{trigger.record.id}}",
"number": "{{trigger.record.number}}",
"resolvedBy": "{{trigger.record.assigned_to}}",
"duration_ms": "{{vars.resolutionDurationMs}}"
},
"deduplicationKey": "{{trigger.record.id}}"
}
}From an SDK Artifact
await ctx.events.publish('incident.resolved', {
incidentId: incident.id,
number: incident.number,
resolvedBy: incident.assigned_to,
}, {
dedup: incident.id, // deduplicated within 5 minutes
delay: 0,
})Via API
/api/v1/events/publishPublish a message to a topic.
{
"topic": "etl.batch.completed",
"payload": { "batchId": "batch_01HX...", "rowCount": 50000 },
"deduplicationKey": "batch_01HX..."
}Subscribing via Workflow Trigger
Set a workflow's trigger type to Event Bus and configure the topic(s):
{
"type": "event_bus",
"config": {
"topics": ["incident.resolved"],
"filter": {
"payload.incidentId": { "exists": true }
}
}
}The workflow fires once per matching message. The trigger payload contains the full event object.
Event Schema
| Field | Type | Description |
|---|---|---|
| id | varchar(26) | ULID event ID. |
| topic | varchar(200) | Topic name. |
| payload | jsonb | Message body. |
| publisher_type | enum | workflow | sdk_artifact | api | system |
| publisher_id | varchar(26) | ID of the publishing entity. |
| dedup_key | varchar(200) | Deduplication key. Same key within 5 min = deduplicated. |
| workspace_id | varchar(26) | Owning workspace. |
| published_at | timestamptz | When the message was published. |
| expires_at | timestamptz | When the message will be purged. |
Event Log
The Event Log tab on the Events page shows a live stream of all published messages. Filter by topic, publisher, or time range. Click a message to see its full payload and which workflows it triggered.
/api/v1/eventsList published events with filters.
/api/v1/events/topicsList all known topics.
Event Replay
Replay any retained event to re-trigger its subscribers:
/api/v1/events/:id/replayReplay an event to all active subscribers.
Useful when a subscriber workflow was inactive during the original event and you need to process it retroactively.