Step Notify (:notify)
Quick Answer
Use :notify to send outbound notifications through HTTP-based channels (email APIs, chat webhooks, custom endpoints).
{:type :notify :channels {:http {...}}}
Canonical Shape
| Field | Type | Required | Notes |
|---|---|---|---|
:type | keyword | Yes | Must be :notify |
:channels | map | Yes | Channel configs (currently :http) |
:data | map | No | Template data merged into channel payloads |
:template | keyword/string | No | Flow template id (channel config base) |
:review | bool/string/map | No | Human review checkpoint before send |
:retry | map | No | Common step retry policy |
:timeout | int | No | Common step timeout (seconds) |
:persist | map | No | Common output persistence options |
Limits And Behavior
:notifystep accepts external delivery channels only.:channels :uiis rejected for:notify.- Use
:wait+:notifyfor in-app approval flows.
HTTP Channel Config
Inside :channels {:http ...}, use the same request model as HTTP step channels:
| Field | Required | Notes |
|---|---|---|
:connection or :url | Yes | Prefer connection reuse |
:path | No | Appended to connection base URL |
:method | No | Defaults from your channel contract |
:headers, :query, :json, :form, :body | No | Standard payload config |
:template / :data | No | Handlebars templating inputs |
Result Shape
The step returns per-channel delivery status:
{:sent? true
:channels {:http {:sent? true
:status 202}}}
If one or more channels fail, :sent? is false and an :errors vector is included.
Canonical Example
{:templates [{:id :ops-alert
:type :notification
:channels {:http {:connection :notify-api
:path "/alerts"
:method :post
:json {:title "{{title}}"
:severity "{{severity}}"
:message "{{message}}"}}}]
:functions [{:id :alert-payload
:language :clojure
:code "(fn [input]\n {:title \"Workflow alert\"\n :severity (or (:severity input) \"warning\")\n :message (str \"Run \" (:run-id input) \" requires attention\")})"}]
:flow
'(let [payload (flow/step :function :build-alert-payload
{:ref :alert-payload
:input (flow/input)})]
(flow/step :notify :send-alert
{:template :ops-alert
:data payload}))}