Skip to main content
Use this guide to create an event-triggered flow, connect a custom event, and test the path before launch. For a concrete welcome sequence, follow the Build a Welcome Flow recipe. Prefer to watch first? The seven minute walkthrough covers the same ground. Each Watch this step link below opens it in a new tab at the matching moment.
Before you start. Add a brand and verify a sending domain. If your backend will fire a custom event, create an API key for the active brand. Watch this step (0:42)

Create the Flow

1

Describe the flow

Open Home and describe the trigger, emails, timing, and outcome. For example:
“Build a two-step onboarding flow for new trial users. Trigger it when user_signup fires. Send a welcome email, wait 3 days, then send a quick-start email.”
Watch this step (1:51)
2

Review the canvas

Brew opens the flow canvas with the trigger, Send Email nodes, and Wait nodes laid out from left to right. Click a node to open its configuration panel.Watch this step (4:50)
3

Edit the flow

Prompt changes in the flow chat, or edit a node directly. For example, ask “Change the wait to 4 days” or “Add a branch after the second email for contacts who clicked.”Watch this step (5:25)
4

Save the draft

New flows start as Draft. Keep the flow in Draft while you configure and test its trigger. You will publish it after the test passes.
Each flow run consumes credits. Email sends inside the flow count toward your monthly send limit.

Create a Custom Trigger Event

1

Create the event

Open Trigger events from the trigger panel settings link or press Cmd+K and search for Trigger events. Click Create event and use a specific name such as user_signup, order_placed, or subscription_renewed.
2

Define the payload schema

Add each field the event will send and mark required fields. Include a required email field for routing:
3

Fire the event from your backend

Send the event to Brew with an API key for the active brand. The API endpoint is POST /v1/automations/triggers/{triggerEventId}/fire. See the API Reference for the request contract.
4

Use the event in a flow

Select the event as an automation trigger. Brew adds its schema to the trigger node, so email content can reference fields with {{ fieldName }}. See Merge Tags for the syntax and for what happens when a field is missing.Watch this step (2:41)
5

Test before launch

Open the flow and click Test automation. Enter a test email address and provide the trigger payload, then click Fire test.Brew runs the full flow and sends every email to the test address only. Real contacts in the payload are never reached, and test runs don’t affect analytics.
6

Publish and monitor

When the test looks right, click Publish in the canvas header to make the flow Live. The next matching event starts it automatically. Open the automation from the list to review execution history and failures.Watch this step (6:02)

Send a Transactional Email

A transactional email is this same flow on a different domain. There is no separate object to create. Build the trigger and a one-step automation, then point the Send Email node at a transactional-purpose domain. That domain is what drops the unsubscribe link and delivers to unsubscribed contacts. Emails vs Automations is the canonical explanation. Verify Your Sending Domain covers setting the purpose.
1

Point the send node at a transactional domain

Open the Send Email node and pick a verified transactional-purpose domain. The same automation on a marketing-purpose domain is an ordinary marketing send that respects unsubscribes.
2

Publish the automation

A fire starts no runs until at least one attached automation is published. Firing an unpublished trigger returns 422 NO_PUBLISHED_AUTOMATION.
3

Fire it from your backend

Send the moment’s data as payload, and the email reads it as {{ trigger.* }}. The email field routes the run to a contact.
Check the wiring before you ship it. GET on the same fire URL is a ready check. It runs the auth, scope, and permission gates without firing, then returns the payload contract and the automations a fire would match. In the SDK this is brew.automations.triggers.fire({ triggerEventId, payload }), and over MCP it is list_triggers and check_trigger_ready.
Marketing consent is not the test for transactional mail. The test is whether the email genuinely answers something the person did. See What You Can Send.

Keep Event Schemas Maintainable

Name events for the action they describe, declare only the fields an email will use, and type every field. Custom Events is the reference for names, schema shapes, and nesting.
If a payload is missing a required field or uses the wrong type, Brew returns 400 INVALID_PAYLOAD and does not start the automation. See the error response shape. Fix the payload and send it again.

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 explore it further with ChatGPT or Claude.