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. Keep the payload flat so it is easy to use in email templates. 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 }}.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 do not 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)

Keep Event Schemas Maintainable

  • Use descriptive event names such as user_signup or order_placed, not event1.
  • Keep payloads flat and include only fields the automation uses.
  • Mark field types in the schema. Brew rejects invalid values before they trigger an automation.
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.