Event Flow Manifest authoring guide
An Event Flow Manifest is the flows[] portion of a connector config. This guide teaches you to author working inbound and outbound flows without reading the runtime source. The per-field schema (every field, every validator, the full action DSL) lives in ../config-v3/ and is not repeated here.
Mental model
A producer puts a message on a queue. The message envelope carries two fields: source_name and event_type. flow_worker loads the connector’s published config from DynamoDB, matches every flow whose source equals source_name and whose event_type equals or wildcard-matches event_type (cliente.* matches cliente.creato; exact match wins when both match the same event - see ../config-v3/flows.md#wildcard-event_type), and runs each matching flow’s steps in order.
Steps read and write a shared per-execution context:
$.payload.*- the inbound event body as received.$.canonical.*- a shared dict atransformstep writes into; later steps read from it.$<step-id>/$.<step-id>.*- the output of an earlier named step in the same flow.when- an optional condition that gates whether a step runs at all (see../config-v3/step-actions.md).
There is no direction field on a flow: nothing on a flow declares its direction. Two derived notions of direction coexist, and they answer different questions.
- Routing and counting follow the QUEUE the event travelled on, which follows the EventSource that emitted it:
source_workerputs HubSpot journal events onoutbound-sync.fifo, the Event API puts webhooks oninbound-sync.fifo. This is the direction recorded on each processed event, and the one the Analytics panel filters by. See event-sources.md. - The badge on a flow (flow list in the dashboard, plus the connector-level badge in the header) is derived from the flow’s STEPS: a flow that writes to HubSpot is
inbound, any other flow isoutbound, and the connector isbidirectionalwhen it has both. Reading HubSpot (find,find_associated) does not make a flow inbound. The rule lives in one place, (internal plugsync tooling - see the source repo), and the draft API serves it (issue #1203).
The two axes can disagree, by design. A journal-driven flow that pushes a document to an external system and then writes the returned id back onto the HubSpot record (Compass’ hubspot_deal_generate_doc, walked through in ../plugins/generate-doc-walkthrough.md) travelled on the outbound queue, so Analytics counts its events as outbound, while its steps do write to HubSpot, so the flow list badges it inbound. Neither is wrong: one describes where the event came from, the other what the flow does.
How events flow
INBOUND (an external system writes into HubSpot)
external system --POST--> Event API / webhook [EventSource: webhook | event_api]
|
v
inbound-sync.fifo (SQS)
|
v
flow_worker (matches source_name + event_type, runs steps)
|
v
HubSpot
OUTBOUND (a HubSpot change flows out to a target system)
HubSpot journal v4 \
REST poller >--- source_worker polls ---> queue (SQS) [EventSource: hubspot | poller | scheduled]
scheduled tick / |
v
flow_worker (matches source_name + event_type, runs steps)
|
v
target API (post step)Prerequisites
Before authoring flows:
- You have a Plugsync org and an authenticated user.
- You have completed the HubSpot OAuth flow once (so a HubSpot credential exists in your org).
- You have created a connector via the dashboard or
POST /api/connectors. - You have created at least one EventSource that the flow’s
sourcewill reference (see event-sources.md).
Where to read next
| Page | What is there |
|---|---|
| event-sources.md | Create the inbound/outbound channels a flow’s source references. |
| authoring-a-flow.md | Two end-to-end walkthroughs + how to pick an action. |
| loop-prevention-and-conflicts.md | The four echo/conflict guards, whether a write from another tool is seen, and where a suppression shows up. |
_examples/ | Two copy-pasteable configs + their EventSource payloads + the CI validator. The individual files are linked from the walkthroughs above. |
../config-v3/ | The field-level schema reference (every field, validator, the 15-action DSL). |
Out of scope
This guide deliberately does not cover:
- Schema reference (every field and validator). See
../config-v3/and #ENG-56. - Plugin steps (Lambda + TypeScript). See the Plugin runtime guide.
- Getting-started tutorial. See #ENG-59.
flow_runtimeinternals.