Before you start. You need a verified sending domain.
1. Set Up Your Trigger
You have two options depending on your stack. Option A: Use an integration. Connect your auth or billing provider in Integrations. Its events become triggers in the automation builder. For a welcome flow, pick the event that marks a new person:
Name the event in your prompt in step 2, or describe it. For example, “Send the real welcome email after the user confirms their email” starts a Supabase flow on
auth.user.email_confirmed.
Each provider’s page lists its events and the merge tags they carry. Keep a fallback on name tags, like {{ firstName | there }}.
Option B: Custom event. To trigger from your own backend, let Brew create the trigger event when it generates the flow. Describe it in your prompt in step 2 and Brew sets it up. Once the flow is generated, wire up the event in your backend with the API Reference.
Capture the Opt-In
A welcome flow is marketing, and signing up isn’t marketing consent. Ask for opt-in at sign-up, such as with an unticked checkbox. Then start the flow with a Filter that lets through only contacts who opted in. Send Marketing Only to Contacts Who Opted In covers custom events and integration triggers. Account emails such as an email-verification link are transactional and belong in their own automation.2. Generate the Flow
Open Home and describe what you want in the chat. A simple prompt is enough:3. Review and Edit Each Email
Click any Send Email node in the diagram to open that email. You have three ways to refine it: Edit with AI via the flow chat. Use the chat panel on the left. It changes the whole flow or a specific email:- “Make the first email shorter and more direct.”
- “Add the recipient’s first name to the subject line of email 2.”
- “Make email 3 feel less like a case study and more like a quick story.”
{{ firstName }} anywhere in the email body or subject line. If no name is available, add a fallback. Hi {{ firstName | there }} renders as “Hi there” when the field is empty.
Merge Tags has the full list of what resolves.
4. Test the Flow
Test at two levels before setting the flow live. Individual emails. Click any Send Email node in the flow diagram, then click Test in the toolbar. The Send a test email dialog opens. Check the domain and sender, add one or more addresses under To, and fill in any Variables you want to check. A blank variable shows its fallback. Click Send test. The subject is prefixed with[TEST] so it’s easy to spot in your inbox. Test emails don’t affect analytics, but they count toward your monthly email sends.
The full flow. On the canvas, open Automation options → Test automation. Enter your own address under Send test to. Fill in the trigger payload fields under Test data so you can check the personalization, then click Run test.
Brew runs the flow, fast-forwarding the waits, and sends each email to the test address only. A test follows one path through each split or engagement step.
Test runs don’t count in analytics. Real contacts on the trigger payload are never hit on test runs.
Recent test runs appear at the bottom of the modal so you can confirm the flow fired correctly.
5. Set It Live
When the flow looks right, click Publish in the canvas header to make it Live. The next matching trigger event will start the flow automatically. Monitor runs from the Automations list. It shows every flow with its current status and trigger. Click into this flow to open its canvas and see individual execution history and catch any failures early.Extending the Flow
Once the 3-step flow is running, common additions include: An Engagement step. After email 2, add an Engagement step. Contacts who clicked go down a deeper product education path; contacts who didn’t click get a simpler re-engagement nudge instead.customer.subscription.trial_will_end, sent 3 days before a trial ends.
It’s a notice about the account, so send it from a transactional-purpose domain and keep any upgrade pitch out.
From an Agent or Code
The same flow builds from chat or from your backend. Over MCP:create_emailmakes each design first. Pollget_emailuntil each is ready.save_automationthen saves the flow, starting with a Filter node oncontact.marketingOptIn. Each send node is pinned to one design’semailIdandemailVersionId, a verifieddomainId, and a subject.test_automationwith atestRecipientruns it end to end to one address. An engagement step sees no opens or clicks unlessscenariosimulates them, so test each path once.save_automationwithpublished: truesets it live.- For a custom event,
save_triggerdefines it first. Your backend fires it withPOST /v1/automations/triggers/{triggerEventId}/fireand anIdempotency-Keyper signup. To check it first,check_triggerwith a samplepayloadvalidates the event, andtest_automationruns the draft and sends nothing without atestRecipient.fire_trigger_eventis a real fire: it starts the published automation and can send email.
POST /v1/automations, POST /v1/automations/{automationId}/test, and PATCH /v1/automations/{automationId} with published: true. Build an Automation walks the code path in order.
Related
- Automations: node types and lifecycle states.
- Automation Triggers: custom events, payload contracts, and connected-source events.
- Build an Automation: the same flow from code, with the trigger wired first.
- Merge Tags: what resolves in a flow and how fallbacks work.
- Launch from a Waitlist: the flow that runs before someone becomes a user.
- Lifecycle Emails for SaaS and B2B: where the welcome flow fits among the other five moments.
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.
Ask ChatGPT or Claude
Click here to open the Copy page menu at the top of this page, then send the page to ChatGPT, Claude, or your editor.