Skip to main content

About Events

Events allow you to trigger automations based on specific actions or behaviors from your product, website, or other systems. When you send an event to Brew via API or integration, it can start an automation flow and include personalized data in your emails.
For information about all trigger types (Contact added, Added to subscription group, Contact updated, and Event received), see the Automations page.

Creating Events

Events can be created in several ways:
  1. Automatically by sending an event
    • Send a new event name via API to create it automatically
  2. Manually from the Events page
    • Navigate to Settings → Events to create events manually
  3. From the automation builder
    • When creating an automation, select “Event received” as the trigger type
    • Enter a new event name or select an existing one
Use Brew’s API to send events:
{
  "email": "user@example.com",
  "eventName": "planUpgrade"
}
The eventName can be an existing event in your account or a new one.If a contact with the provided email doesn’t exist, a new contact will be created.

Using event properties

You can include additional data with each event using event properties. These properties allow you to personalize emails based on event-specific information.
You can add event properties in two ways:
  1. From the Events page
    • Navigate to Settings → Events
    • Click on an event
    • Click ”+ Add event property”
  2. From the automation builder
    • When creating an automation with an “Event received” trigger
    • Click “Edit event properties”
Event properties can be one of four types:
  • String: Text values
  • Number: Numeric values
  • Boolean: True/false values
  • Date: Date and time values (Unix timestamp in milliseconds or ECMA-262 date-time string)
All property names must be unique within the same event, and spaces are trimmed from the beginning and end of property names.
Include event properties in your API request using eventProperties:
{
  "email": "user@example.com",
  "eventName": "planUpgrade",
  "firstName": "Sam",
  "eventProperties": {
    "newPlan": "Pro",
    "oldPlan": "Basic",
    "planPrice": 29,
    "isLifetime": false,
    "updateDate": "2024-03-07T10:09:23Z"
  }
}
Important notes:
  • Brew attempts to convert mismatched types
  • New properties not previously defined won’t be available for use in emails
  • Always define event properties before sending them in events
Once defined and sent, event properties become available in your emails:
  1. In the email editor, click the Event properties icon (⚡️) in the toolbar
  2. Select the property you want to add
  3. The property will be inserted as a variable that gets replaced with the actual value when the email is sent
This allows you to create highly personalized emails based on the specific event data.

Testing Events

You can test your event setup without sending actual emails:
  1. Send test events via the API using test contacts
  2. Monitor how contacts move through your automation
  3. View event logs in Settings → Events to confirm your events are being properly received

Event Best Practices

Choose clear, specific event names that describe the action:
  • Good: planUpgrade, orderPlaced, trialStarted
  • Avoid: event1, action, trigger
Always define event properties in Settings → Events before sending them via API. This ensures they’re available for use in your emails and prevents data loss.
Send event properties that add context and enable personalization:
  • Include user identifiers (user ID, account ID)
  • Include relevant details (product name, price, feature used)
  • Include timestamps for time-sensitive flows

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.