BetaWorkflow trigger
An event from a connected app
Beta — ready to use, but some details may still change.
Overview
Starts the workflow when another app of your workspace publishes an event this app subscribes to — for example sales.order_confirmed@1 from the sales app.
Purpose
React to what happens in your other apps: reserve stock for a new order, draft a purchase request when stock runs low, record a completed work order in the asset history.
Inputs
- Event —
<name>@<version>of an event another app publishes. The subscription must be approved by a workspace owner or admin (More → Connections).
Configuration
- Each event is processed once per subscription: the run and its idempotency key are written in one transaction under this app's data lock, so a retried or duplicate delivery does nothing.
- If the workflow fails with an error, everything it wrote is rolled back and the delivery is retried (30 s, 2 min, 10 min, 1 h); after 5 attempts it becomes a failed delivery an admin can retry or discard. A Stop step counts as handled.
- Test events run the draft on test data; live events run the published version on live data. A paused subscription, an unpublished or deleted app stops deliveries (marked cancelled).
Outputs
- No trigger record and no signed-in user. Event data holds the declared fields:
{{event.<field>}}(for example{{event.sku}}), plus{{event._event.source_app}},{{event._event.id}}and{{event._event.emitted_at}}. - Available data in every step: Current record /
{{record.field_key}}(the record that triggered the run), Event /{{event.name}}(inputs passed to the run;{{event.before.field_key}}holds the previous values after an update), Action results /{{results.key}}(values saved by earlier steps) and Current user /{{user.email}}(whoever caused the run; for test runs, you).
Example
Reserve stock for a sales order
Example
Trigger: An event from a connected app · sales.order_confirmed@1
Step 1 Find records Products (SKU = {{event.sku}}) → save as prod
Step 2 If {{results.prod_count}} = 0 → Stop “Unknown SKU”
Step 3 Database › Create Reservations (Product = {{results.prod.0.id}}, Quantity = {{event.quantity}})Errors
- A failing run appears in the Connections delivery log with its error and next attempt (the run itself is rolled back).
Limitations
- Beta. Events are not ordered.
- Only apps of the same workspace; data of other workspaces is never visible.
Advanced
- Trigger:
{ type: 'app_event', appEvent: '<name>@<version>' }. Worker:processDeliveries()(src/server/connections/delivery.ts), after each emitting commit and from/api/workflows/cron; consumer keyevt:<eventId>inworkflow_idempotency_keys(workflow idsub:<subscriptionId>).