Webhooks
Webhooks connect MedFlow to other systems over HTTP, in both directions: a pathway can call out to an external system, and an external system can send data in to MedFlow.
| Direction | What it is | Built from |
|---|---|---|
| Outbound | A pathway node calls an external HTTP endpoint | Automated action Send Web Request |
| Inbound | An external system POSTs data to a MedFlow URL | Data source Inbound Webhook |
An inbound webhook is a URL an external system POSTs data to. It is not a trigger and does not start a run on its own. MedFlow ingests what you send, and when that data represents something a pathway should act on, MedFlow raises an event that an event trigger starts the run from. MedFlow owns the event; the webhook only carries the data. To start a run directly from your own backend, use a web trigger instead.
For the routes, request bodies, and response shapes, see the Webhooks API.
Outbound: Send Web Request
Section titled “Outbound: Send Web Request”Place the Send Web Request automated action on a diagram node. When a run reaches that node, MedFlow sends an HTTP request to the URL you configured, with the method, headers, body, and timeouts you set. Use it to notify partners, push status, or pull a one-shot resource mid-pathway. Auth and secrets for the remote system are stored with the connection in your tenant.
Inbound: Receiving Data
Section titled “Inbound: Receiving Data”An external system POSTs data to your webhook URL. MedFlow authenticates the delivery, then ingests the data so Find and pathways can use it. It accepts JSON objects and FHIR R4 bundles. See Deliver data.
From there MedFlow decides what happens. Most data simply keeps the clinical picture current for search. When incoming data maps to something a pathway should act on, MedFlow raises an event and an event trigger starts a run. Either way MedFlow raises the event. The external system never fires a trigger directly.
Events MedFlow commonly raises from inbound data:
| Event | Starts |
|---|---|
order.signed | Order follow-up pathway |
lab.result.received | Lab review pathway |
patient.created | New patient intake pathway |
Choosing
Section titled “Choosing”| Need | Use |
|---|---|
| Your system has a payload and a known trigger id | Web trigger |
| A partner pushes data to MedFlow, for Find or to let MedFlow react | Inbound webhook |
| React to a change MedFlow sees, like a new lab result | Event trigger |
| A pathway must call out to a partner mid-run | Send Web Request |
Security
Section titled “Security”- MedFlow requires every inbound delivery to be signed with an HMAC-SHA256 signature, using the endpoint secret as the signing key, and rejects unsigned or invalid requests. The secret never travels on the request, and a signed timestamp guards against replay. See Signing deliveries. Rotate secrets without changing the URL where possible.
- Inbound payloads may contain PHI. They are tenant-scoped and covered by Security.
- Outbound Send Web Request never logs secrets or full PHI bodies in clear text.