Operate

Notifications And Email

Breyta notification guide for :notify and wait notifications, including email delivery via HTTP channels.

Goal

Send operational notifications and email alerts from flows using canonical notify config.

Quick Answer

Use flow/step :notify for external delivery (:http), and :wait {:notify ...} for approval notifications with action links.

Notify Step Pattern

(flow/step :notify :send-email
  {:type :notify
   :channels {:http {:connection :sendgrid
                     :path "/v3/mail/send"
                     :method :post
                     :json {:personalizations [{:to [{:email "{{recipient}}"}]}]
                            :from {:email "alerts@example.com"}
                            :subject "{{subject}}"
                            :content [{:type "text/plain" :value "{{message}}"}]}}}
   :data {:recipient "ops@example.com"
          :subject "Flow completed"
          :message "Order {{order-id}} succeeded"}})

Wait Notification Pattern

(flow/step :wait :approval
  {:key "approve:order:123"
   :timeout "2h"
   :notify {:channels {:http {:connection :sendgrid
                              :path "/v3/mail/send"
                              :method :post
                              :json {:personalizations [{:to [{:email "approver@example.com"}]}]
                                     :from {:email "approvals@example.com"}
                                     :subject "Approval required"
                                     :content [{:type "text/plain"
                                                :value "Approve: {{approval-url}}\nReject: {{rejection-url}}"}]}}}}})

Template Support

  • channels support Handlebars values like {{title}}, {{message}}, {{approval-url}}
  • wait notifications inject action URL variables automatically
  • for reusable channel payloads, define a :notification template in :templates

Current Channel Support

  • flow/step :notify: :http only (SendGrid, Slack, webhooks, custom APIs)
  • :wait {:notify ...} and checkpoint prompts: optional :http

Common Pitfalls

  • missing :channels in notify step -> validation error
  • assuming wait approvals require in-app channels -> use :http notifications with approval/rejection URLs
  • wrong connection slot in :http channel -> auth/connection errors
  • expecting native :email channel type -> use :http with an email provider API

Related

As of Feb 13, 2026