The problem
A marketer building a journey often needs one more thing to happen when a contact reaches a step: start a Salesforce Flow, or call an API. Journey Action Hub is a custom activity for exactly that. Drop it into a journey, pick an org and a Flow, map the Flow's inputs to journey data, and every contact that reaches the step triggers the action.
What it does
- Flow action: finds active autolaunched Flows, reads their input variables, and lets the marketer map each one to journey data.
- REST action: journey data can go into the path, query, headers or body of an HTTPS call.
- A four-step wizard inside the Journey Builder canvas, with drafts saved on the server so it reopens where you left off.
- Operational safety: idempotency keys, rate limiting per business unit, and twelve error categories, each with a fixed HTTP status and retry rule.
How it is built
It is a single Cloudflare Worker on D1, with a Node and Docker adapter for teams that must host on AWS. New action types follow a strategy pattern: one file plus a registry entry.
The design decision I care most about is no configuration in the journey. Activity payloads are visible to anyone who can edit the journey, and they get copied along with it. So the journey only holds resolved values and an opaque configuration ID. Salesforce sign-in uses the authorization code flow with PKCE, refresh tokens are encrypted with AES-256-GCM, contact keys are hashed, and every Journey Builder callback is verified as a signed JWT.
Retries are set to zero on purpose. A timeout does not tell you whether the Flow ran, and running a Flow twice is usually worse than reporting a failure.
What I learned
- Read the SDK's side effects. Saving a draft closed the modal on every step, because Postmonger's
updateActivityskips any remaining configuration steps. - Truncation creates collisions. Cutting argument names to 60 characters collapsed every field of a synchronised data extension onto one name. The fix keeps the tail and appends a digest.
- A test can agree with a bug. A user info endpoint lives on the auth host, not the REST host. The test asserted the wrong host, so CI passed while the real call failed.
- State limits honestly. The Workers runtime cannot resolve DNS, so DNS rebinding cannot be detected in-process. The security notes say that openly instead of implying full protection.