Skip to main content

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.

Automations in Brew Automations are emails Brew sends in response to events in your business. They cover two patterns:
  • 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.
Both run the same way: an event happens in your business, Brew receives it, the right email (or sequence) fires.
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 timeYou 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 engagementThe user is unsubscribed but still needs to receive it (receipts, password resets)
Examples: welcome flow, onboarding, abandoned cart, win-backExamples: password reset, order confirmation, login alert

Create a flow

1

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.
2

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.
3

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.
4

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.
5

Monitor runs

The Automations dashboard shows summary stats (Active, Runs, Sent, Issues) and per-flow details. Click into any flow to see its execution history and investigate failures.

The four node types

Every flow is built from four nodes plus a trigger.
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
Best practice: keep each email focused on one outcome. Personalize using contact properties ({{{firstName}}}) and trigger payload values ({{@trigger:output.payload.orderId}}).
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.
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.
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

StateMeaningNotes
DraftBeing created or edited. Not running.Edit freely. Publish when ready.
PublishedLive. New trigger events start the flow.Pause to make edits.
ArchivedHalted. No new runs will start.Use when you want to fully stop a flow.
Pausing keeps the flow’s history intact and lets you resume later. Archiving is for flows you no longer need.

Personalization

Use merge tags anywhere in your emails to pull in contact or trigger data:
SourceSyntaxExample
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)
Variable names are case-sensitive. {{{firstName}}} matches a payload field named firstName, not firstname. Mismatched names render as empty.

Common patterns

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
Manage both from the Settings link in the trigger panel, or press Cmd+K and search for Trigger events.

Custom events

Define a custom event whenever you want to start an automation from your own product.
1

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_thing
2

Define 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:
{
  "email": "alex@example.com",
  "firstName": "Alex",
  "orderId": "ORD-12345",
  "plan": "pro"
}
Avoid:
{
  "user": { "email": "alex@example.com", "name": "Alex" },
  "order": { "id": "ORD-12345" }
}
3

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.
4

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}}.
5

Test before launch

Send a test event from the Trigger events page. The test runs through your published automations exactly like a real event would, so you can verify the flow end-to-end before going live.

Trigger best practices

Names should describe the action. user_signup and order_placed are clear. event1 is not.
Flat payloads are easier to map to merge tags and easier for your team to maintain. Only include fields you’ll actually use.
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_succeeded
  • checkout.session.async_payment_failed
  • checkout.session.completed
  • customer.created
  • customer.updated
  • customer.deleted
  • customer.subscription.created
  • customer.subscription.paused
  • customer.subscription.resumed
  • customer.subscription.trial_will_end
  • customer.subscription.deleted
  • invoice.paid
  • invoice.payment_failed
  • invoice.upcoming
  • quote.finalized
  • quote.accepted
  • quote.canceled
Common pattern: trigger a “payment failed” dunning sequence on 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 a 400 INVALID_PAYLOAD error and does not start the automation:
{
  "error": {
    "code": "INVALID_PAYLOAD",
    "message": "Payload validation failed",
    "details": [
      { "field": "orderId", "message": "Required field 'orderId' is missing" }
    ]
  }
}
Fix the payload on your side and re-send.

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:

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.