Documentation Index
Fetch the complete documentation index at: https://docs.brew.new/llms.txt
Use this file to discover all available pages before exploring further.

- Marketing flows. Multi-step sequences like welcome flows, onboarding drips, abandoned-cart recovery, and re-engagement.
- Transactional emails. Single, real-time emails like password resets, order receipts, and account notifications.
Transactional emails are always delivered, even to unsubscribed contacts, because they contain information the recipient actually needs. Marketing flows respect unsubscribes.
When to use which
| Use a marketing flow when… | Use a transactional email when… |
|---|---|
| You want to send a sequence of emails over time | You want one email, sent immediately |
| Timing matters (wait 3 days, then send the next) | The email is essential. The user expects it right away |
| You want to branch based on engagement | The user is unsubscribed but still needs to receive it (receipts, password resets) |
| Examples: welcome flow, onboarding, abandoned cart, win-back | Examples: password reset, order confirmation, login alert |
Create a flow
Describe what you want
Open Home and tell Brew what to build. The more specific you are about purpose, length, and content, the better the first version will be.
Build a 3-step welcome flow for new newsletter subscribers. Trigger when someone subscribes. First email: warm welcome and a link to top resources. Wait 3 days. Second email: a short story from a happy customer. Wait 4 days. Third email: nudge to upgrade with a 14-day trial.
Review the generated flow
Brew opens the flow editor with the trigger, every email, every wait, and any filters or splits. You’ll see the React Flow diagram on the right and chat on the left.
Edit by talking or clicking
Two ways to edit:
- In chat. “Add a 24-hour wait after the second email.” / “Make the third email more playful.” / “Split the flow based on whether they clicked the second email.”
- In the diagram. Click any node to open its config panel. Edit email content, change a wait duration, adjust a filter.
Activate
When the flow is ready, change its lifecycle status from Draft to Published. Once published, the next matching trigger event starts the flow.
Each flow run consumes credits. Email sends inside the flow count toward your monthly send limit.
The four node types
Every flow is built from four nodes plus a trigger.Send Email
Send Email
Sends an email to the contact running through the flow.For each Send Email node, you can:
- Generate a new email. Provide a prompt and Brew writes it on-brand
- Reuse an email from another flow. Copies it into this flow
{{{firstName}}}) and trigger payload values ({{@trigger:output.payload.orderId}}).Wait
Wait
Pauses the flow for a set duration before continuing. Use to space out emails (wait 3 days after signup) or give time for an action to happen.Choose from preset durations (1 hour, 1 day, 3 days, 1 week) or set a custom value.
Filter
Filter
Checks whether the contact matches a condition. If they match, they continue. If not, that branch ends for them.Filter on contact properties (plan = “pro”), behavior (opened the previous email), or trigger payload data.
Split
Split
Splits the flow into two paths so contacts get different experiences. Each path is its own filter. Contacts go down whichever matches.Common pattern: split based on whether someone clicked an earlier email. Engaged contacts get a deeper sequence; non-engaged contacts get a re-engagement nudge.
Triggers
Every automation needs a trigger, the event that starts the flow. In the flow editor, click the trigger node to pick from your existing trigger events or create a new one. To manage trigger events, click the Settings link in the trigger panel, or press Cmd+K and search for Trigger events. Details are below. Common trigger moments:- New user signup
- Order placed
- Trial ending soon
- Payment failed
- Cart abandoned
- Subscription canceled
Lifecycle states
| State | Meaning | Notes |
|---|---|---|
| Draft | Being created or edited. Not running. | Edit freely. Publish when ready. |
| Published | Live. New trigger events start the flow. | Pause to make edits. |
| Archived | Halted. No new runs will start. | Use when you want to fully stop a flow. |
Personalization
Use merge tags anywhere in your emails to pull in contact or trigger data:| Source | Syntax | Example |
|---|---|---|
| Contact property | {{{firstName}}} | Hi Alex, |
| Custom property | {{{plan}}} | Your Pro subscription |
| Trigger payload | {{@trigger:output.payload.orderId}} | Order #12345 |
| Fallback | {{{firstName | there}}} | Hi there, (if no name) |
Common patterns
- Welcome flow
- Abandoned cart
- Password reset
- Order confirmation
- Re-engagement
Multi-step. Triggered when a new user signs up.
Build a 3-step welcome flow triggered by user_signup. First email welcomes them and sets expectations. Second email sends a quick-start guide. Third email shares a customer success story.
Trigger events
Trigger events are the signals that start your automations. Brew supports two kinds:- Custom events. Events you define and send from your backend (e.g.
user_signup,order_placed) - Built-in events. Events automatically discovered from connected sources, like Stripe billing events
Custom events
Define a custom event whenever you want to start an automation from your own product.Create the event
Open Trigger events from the trigger panel settings link or Cmd+K, then click Create event. Give it a clear, specific name.Good:
user_signup, order_placed, subscription_renewed
Avoid: event1, trigger, do_thingDefine the payload schema
Add the fields your event will send and mark which are required. Brew validates incoming events against this schema and rejects events that don’t match.Keep payloads flat. Avoid nested objects when you can. Flat payloads are easier to use in email templates.Good:Avoid:
Wire it up in your backend
Send events to Brew’s API with an API key (create one in Settings → API). Each event includes the trigger event ID and the payload.See the API Reference for the exact contract.
Use it in an automation
In any automation, pick this event as the trigger. Brew populates the trigger node with your schema so you can reference payload fields in emails using
{{@trigger:output.payload.fieldName}}.Trigger best practices
Use descriptive event names
Use descriptive event names
Names should describe the action.
user_signup and order_placed are clear. event1 is not.Keep payloads flat and minimal
Keep payloads flat and minimal
Flat payloads are easier to map to merge tags and easier for your team to maintain. Only include fields you’ll actually use.
Validate types in your schema
Validate types in your schema
Mark fields as
string, number, boolean, etc. Brew rejects invalid payloads before they trigger anything, surfacing problems early.Stripe events
Once you’ve connected Stripe in Integrations, Brew automatically listens for the relevant Stripe events. You don’t need to configure them. They show up as available triggers in the automation builder. Brew supports these Stripe events as automation triggers:checkout.session.async_payment_succeededcheckout.session.async_payment_failedcheckout.session.completedcustomer.createdcustomer.updatedcustomer.deletedcustomer.subscription.createdcustomer.subscription.pausedcustomer.subscription.resumedcustomer.subscription.trial_will_endcustomer.subscription.deletedinvoice.paidinvoice.payment_failedinvoice.upcomingquote.finalizedquote.acceptedquote.canceled
invoice.payment_failed, or kick off an onboarding flow on customer.subscription.created.
Brew only listens for these events. It never charges customers, modifies subscriptions, or refunds payments.
What happens when a payload fails validation
If an event arrives with missing required fields or wrong types, Brew returns a400 INVALID_PAYLOAD error and does not start the automation:
Need Help?
Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:- Self-Service Tools
- Talk to Our Team
Search Documentation
Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.
ChatGPT/Claude Integration
Click “Open in ChatGPT” at the top right of any page to analyze documentation with ChatGPT or Claude for deeper insights.