Bento

Events & Flows Overview

View on YouTube

Understand how events, event details, and flows work together - plus how to use Tanuki to build flows for you.

Events and flows are where Bento goes from "email tool" to "automated behavior-driven marketing engine."

In the Bento Email-Sending Basics lesson, we introduced flows briefly. Now let's go deeper.

This lesson covers how events and flows work, how they connect, and some of the more powerful things you can do when you combine them.

We'll build real flows hands-on in the upcoming lessons; this one is about understanding the mental model.

For the full reference, see the Events and Workflows pages in the Bento docs. (Bento's docs use the term "Workflows" - same thing as "Flows" in the app UI.)


Events: The "What Happened" Signals

An event is a record of something a person did.

It has four parts:

  • Who: The person (identified by email)
  • What: The event type (a name you define)
  • When: The timestamp
  • Details: Optional additional data about the action

Some events are built in - Bento tracks things like $view (page visits via Bento.js), $click (email link clicks), and $unsubscribe automatically.

Integrations like Shopify and Stripe also send events on their own.

Everything else is a custom event you define and send, e.g. completed_onboarding, attended_webinar, etc. - whatever makes sense for your business.

Events can come in from your website (via Bento.js), your backend (via the API or SDKs), or through integrations that send events automatically.

Event Naming: The $ Convention

You'll notice Bento's built-in events all start with $.

For your custom events, the $ prefix is optional. It doesn't change anything technically.

Jesse uses it on everything for consistency, and also namespaces his events with dots: $account.created, $account.signed_up, $purchase.completed.

This makes it easy to target groups of related events.

But for me personally, I don't. Pure taste; doesn't affect functionality.

Pick whatever convention feels intuitive to you and stay consistent with it.

Event naming and contains matching

Flow triggers match event names with contains logic by default, not exact equality.

That means a broad name can overlap a more specific one. If one flow listens for $signed_up and another listens for $signed_up.free, an event named $signed_up.free can match both triggers, because the longer name contains the shorter one.

Same idea if you name events $signed_up, $signed_up.free, and $signed_up.free.trial. Dot namespaces make related events easier to read, but they do not prevent overlap. The broadest name still matches the more specific ones.

Practical rule: use non-overlapping trigger names unless you intentionally want a broad catch-all. When related names must overlap, add an exact-match Liquid filter. We cover exact matching and safe test-event names in the Advanced Flow Branching lesson.


Event Data: Details vs. Fields

This is one of the most useful things about Bento's event system.

Events can carry two types of additional data:

Details are data about the event itself - the product purchased, the amount, the plan name, the page URL.

Fields are data about the person - their first name, company, plan type, or any custom field you want to update on their subscriber profile.

Here's the key thing: when an event comes in, Bento automatically updates the subscriber's profile with any fields you include.

If the person doesn't exist yet, Bento creates them.

A single event can trigger an automation AND update the subscriber's data, all in one API call.

The payload looks like this:

{ "type": "$purchase", "email": "customer@example.com", "details": { "value": 99.00, "currency": "USD", "product_name": "Annual Subscription" }, "fields": { "first_name": "John", "customer_type": "new" } }

details stays with the event (you can reference it inside flows and their emails).

fields gets written to the subscriber's profile.

So basically, fields are passed when you want data to be stored on the subscriber forever - and event details are passed when you only need that data temporarily within the scope of your automated flow.

We'll use event data extensively when we build flows in the upcoming lessons.

For now, just know the distinction - it'll click once you're building with it.


Flows: The "What To Do About It" Engine

Flows (called "Workflows" in the Bento docs) are where Bento's visual automation builder magic happens.

(They're my personal favorite Bento feature.)

A flow starts with a trigger - something happens, usually an "event" - and then executes a series of steps.

Jesse's way of framing it: "Most flows in Bento are 'some event comes in, then we do something with it.'"

Triggers

Triggers start a flow. The most common ones:

  • Event received - a specific event is tracked (this is the big one)
  • Tag added - a tag is applied to a person
  • Webhook received - an external system sends data

Actions

Actions are what the flow executes after the trigger fires. Common ones are:

  • Send email - queue an email to the person
  • Add to Sequence - start them in an email sequence
  • Add / Remove tag
  • Set field - update a field value on their profile
  • Trigger event - fire a new event (which can trigger other flows)
  • Send webhook - notify an external system

Delays

Delays pause the flow before the next step. There are lots of options here, e.g....

  • Wait a fixed amount of time (1 hour, 3 days, a week)
  • Wait until a specific time of day
  • Delay until a date stored in a subscriber's custom field (e.g. "send 30 days after their created_at date")

Conditions & Splits

Conditions branch the flow based on criteria:

  • Does this person have a specific tag?
  • Does a field equal a certain value?
  • Are they in a particular segment?

This is where flows get their real power over sequences.

Sequences are linear; flows can branch and route people down different paths based on who they are and what they've done.

Bento has two types of splits:

  • Standard splits - the if/then UI where you pick a tag, field, or segment condition
  • Magic splits - Liquid-based splits where you write an expression that evaluates to true or false

Jesse is a big proponent of magic splits over standard ones; they process faster and are more flexible.

We'll cover magic splits in detail in the Liquid lesson once you have the Liquid fundamentals down.

Flow Status: Draft vs. Active

When you create a flow, it starts in Draft mode.

You can build and tweak it without anything happening.

When you're ready, set it to Active and it starts processing people.


Building Flows With Tanuki

Tanuki is Bento's built-in AI assistant.

It lives throughout the platform, but one of its most useful features is flow building.

You can describe what you want in plain English, and Tanuki will scaffold the flow structure for you.

Jesse's example prompt:

"Build me a 10 email series that splits if someone is a customer."

Tanuki scaffolds out the trigger, the email nodes, the condition check, the branching, and the delays.

Important distinction: Tanuki is focused on scaffolding and piping - building the structure of a flow, not writing content. It'll create email nodes and wire them together, but it won't compose the actual email copy inside those nodes. You still write the emails yourself.

Beyond building flows from scratch, Tanuki is also handy for making structural edits to existing flows:

  • "Update all delays to 10 days each"
  • "Switch out {some custom field} to {another}"
  • "Reconnect X to Y"

One nice detail: Tanuki has context of your other flows and automations, so it'll often follow patterns you've already established in your account.

It won't be perfect every time. Jesse has intentionally excluded some actions (like firing events) to keep it focused on the core scaffolding use cases and minimize chances of infinite loops or other big-deal flow bugs.

I'll be honest: I don't personally use Tanuki for flows (I build mine manually).

But when you're getting started, the blank canvas can be overwhelming, and it's often easier to "edit something someone else made" than doing it all from scratch yourself - this is where Tanuki really shines.


Advanced Flow Concepts (Preview)

These are patterns you'll use hands-on in the upcoming lessons. For now, just know they exist.

Canceling Other Flows

A flow can remove a person from another active flow.

This is essential when you have sequences that interact with each other.

Example: a subscriber is in your free-plan upsell flow, then they upgrade.

Your upgrade flow should cancel the upsell flow so they stop getting "please upgrade" emails.

We'll build exactly this pattern in the Flow-Driven Sequence Setup lesson.

Passing Event Data Downstream

When a flow fires a new event (via the "Trigger event" action), you can pass data from the original triggering event into the new one.

This lets you chain flows together.

Flow A triggers on $signed_up, processes the subscriber, then fires $onboarding_started with the relevant details carried forward. Flow B picks up from there.

We'll use this pattern in the Flow With Events, Tags, Fields, & Emails lesson.

Dynamic Event Names With Liquid

You can use Liquid templating in the "Trigger event" action to dynamically construct the event name.

Instead of hardcoding $onboarding_started, you could build the event name based on the subscriber's plan type, the product they purchased, or any other data available in the flow.

This is a more advanced pattern. We'll cover Liquid itself in the Liquid lesson first.


Now that you have the mental model for how events and flows work together, we're going to start building.

The next lesson connects Claude to Bento via MCP so you can draft sequences with AI. After that, the hands-on flow lessons put this mental model to work: connecting sequences to flows, working with event data inside flows, and triggering behavior-based automations.


When to move on

  • You can explain what an event is (who, what, when, details) and what a flow does with it
  • You know the difference between event details (temporary, tied to the event) and fields (stored on the subscriber profile)
  • You can name the main trigger types and action types you'll use in upcoming lessons
  • You understand why broad event names like $signed_up can overlap more specific names like $signed_up.free
  • You know Tanuki can scaffold flow structure, but you still write the email copy

Video transcript

Welcome back. In this lesson, I'm going to give you a bit of a primer on how events and flows work in Bento. And then in the coming lessons, we'll actually be doing some more of the take action style stuff where we build things. But for now, I just want to give you an overview, because this concept, especially of events, is not always intuitive if you're coming from a platform like ConvertKit, or I guess they're just Kit now, [clears throat] where pretty much everything there is tag driven.

Someone got a tag, you removed a tag, et cetera. And it can sometimes take a moment to adjust to the concept of events, but once you do, there are a lot more possibilities that events bring, and it's one of Bento's coolest things, even if it's maybe not intuitive because it's not common in the simpler platforms or whatever. I don't know. In any case, within Bento, everything that ever happens is initiated by an event.

And the event is the thing that happened. And sometimes an event might be somebody had a tag added or a tag removed, or other times the event might be somebody purchased a product in Shopify. Other times it might be a user did blah blah blah thing inside of our app, or other times it might be it's Thursday at 9:00 a.m., which is a cron event trigger. There are a bunch of different shapes that an event takes, but the thing that they all have in common within the context of Bento is that they all follow the Bento events structure.

So if you click the link to the Bento events page in the docs, you can see how the events are structured. Basically, any event coming into Bento needs to have the event type, so the name of the event, the email address of the person it's happening to, and then these two really powerful objects as they're called in JavaScript. But basically these, let's think how to say it in normal words. Sets of data?

Is that how we could say it for a non-developer? Basically, you can pass as many or as few things as you want within the event details, and same deal with fields. The difference between details and fields are that the event details are used within an email automation flow for understanding what happened and doing things based on that. So in this case, the value of the purchase was 99 US dollars, and the thing purchased was the annual subscription.

So the automated flow can look at the event details and branch accordingly. So if somebody bought an annual subscription, send them this email. If they bought a monthly subscription, send them this email, or add this tag to them, or wait five minutes and then call them, or whatever. Bento doesn't call them, but it could tell you to call them.

Whereas fields, anything you pass here will actually get set as a custom field value on the subscriber. So the way that I like to differentiate them is that event details are ephemeral data that only exist for the flow that's understanding it, and it's used to do other stuff with. Whereas fields are when you literally want something to persist on the person's profile. So if you look at a lot of these, most of these wouldn't make sense as fields.

If you said product ID on John Doe's profile, that's confusing. John Doe is not a product ID. And even if you change that to product ID purchased, that's confusing too, because what if John Doe buys another product later? So you wouldn't want to shove these things onto a profile.

Most of the time, what you would maybe do is put these things into your workflow. The workflow looks at what product they purchased, and maybe it puts a tag on John where it's like, "Purchased this product." So that later when they purchase five others, he now has five tags of different products he's purchased. So we're going to get into flows later, and this one I have is somewhat complex. But I wanted to show you this as an example of how events can be branched based on.

So in this case, when we fire an event called, in this case, it's a test example plan, professional plan purchase. When we fire that event and that event contains an event.details for the plan name, it can either be professional or light. We can then in our workflow split based on that. So we can say, "Is the plan that was purchased professional?

If so, go down this route. If not, go down this route." And then down here, we can say, "Okay, well, it wasn't professional. Was it maybe light? If so, go down this route.

If not, go down this route." And with this kind of branching, we can do some really powerful stuff, which is really exciting. And if all this looks intimidating, it doesn't have to be that intimidating, because one of the cool things about Tanuki in Bento is that Tanuki can actually help you scaffold out flows. So, like this kind of branching here, I think Tanuki might have even made these in the first place. It would make these little magic splits for you and stuff.

But alas, don't get overwhelmed yet. We're going to play with these more, and we're going to onboard you with much simpler flow than what you see here. This is from the very last lesson in the section. With regards to events, what's useful about Bento is that if you click to a user's profile, you just look them up in the People tab and you click into them.

By default, you're going to see recent events that have fired for this person. And if you click into one, you can see all the info that came along with it. So you can see that in this case, the event details was only set to have a plan type, and this was the value for it. So plan type was example multi-word light.

That was the value that came through. The event type was Bento training example purchase three. So this is a really useful way to get a sense for what's coming ... through from your external tool if it's integrated with Shopify or whatever, and also help you build your automations to just see how this stuff's structured. So you can even copy the Liquid, and so now it's event.details.planType because that's what corresponds here.

So this view is really helpful because you can essentially just copy and paste from here into your workflow. One other thing I also wanted to note for you is that event names, so in this case, this event name/event type. I call it event name, but I think it's formally called an event type. So this and this, they're the same thing.

They can start with a dollar sign if you want. They could start without a dollar sign if you want. All of the internal Bento events, like somebody viewing a page on your site, which is this, someone clicking a link, somebody unsubscribing, et cetera, they all have dollar signs. And Jesse likes to do this format where he'll namespace things with a dot.

For me, I tend to not use the dollar sign for my events. It's just a pure taste thing. So I just wanted to flag that for you. It doesn't actually affect how anything runs.

So to give you a bit more of a primer on the flow side of things, basically a flow is pretty much broken into triggers and actions. So something happens to trigger the flow, that's a trigger. And then actions are a myriad of options of things we could do. So I have them all on the page.

Or not all, but many of them on the page that are the most common. But I would say that the most common thing I would see in a flow or that I use in a flow is a trigger, which is typically an event or a tag, and then usually a delay, let's say a five-minute delay or a one-day delay or something. And then an action, which is usually sending an email. Or in the case of that complex flow, we didn't actually build any actions, so never mind.

But you might do one where based on what product they purchase, you add a tag to them so that you can always look them up based on products they've purchased before. Those would be actions. And then conditions and splits are what we see here. So any of these things where it can branch both ways, that's what's called a conditional or a split.

One of the things that's really cool about Bento is that you can actually trigger additional events from one flow chain. So I think I have that in here. Yeah. So in this case, we did something crazy, which is that this here is an event trigger, and it contains, just like the other branch I showed you earlier, it contains the plan that was purchased, so either the pro plan or the lite plan.

And then this here is an event action. So this triggers based on one event, and then this here fires a different event. But what's really cool is that when you fire a different event, you can actually pass in the trigger's event details into the action. So in other words, the trigger one up here, the top one, received the event.details.planType.

And then right here, we're running an action where we're actually injecting that plan type into the name of the event we're calling. But we could also have done it here. So you could do thing one, and you could literally not do all that other stuff to make it simpler. You could do this.

So now you'd be firing a new event with these event details, and in this case, the wild stuff we're doing is we're actually changing the name. So in this case, what's happening is it's either going to fire an event called Bento Training Example Plan Purchase Professional or Bento Training Example Plan Purchase Lite, because those are the two possible things that could come through as the plan type. And then these right here are new event triggers looking for those specific things being fired. So lots of really, really powerful stuff you can do when you have an event that gets triggered, you do some stuff based on the information, and you fire off other events.

You can build very powerful automations this way. And similarly, you can do creative delays this way. So instead of your delays always being wait one hour, wait one week, whatever, you can also have your delays wait until something that was passed in from an event or something that's set on a user's field, which is quite cool. I don't want to overwhelm you, though, any more than I already have.

This will become a lot more intuitive as we go deeper and have more practice. So the final thing I want to talk about in terms of the functionality within the Bento flow editor is the splits. So there are actually two splits. So if you right-click anywhere, you can open up the quick drop menu, and within Splits and Logic, you'll see Split and Magic Split.

Magic Split is relatively new, and it's the one I showed you before. The old split is pure UI. So, you choose the thing, you choose the values, et cetera. It's a bit more intuitive to build yourself, but the Magic Split has a couple of advantages.

So number one, the Magic Split processes almost instantly, whereas the normal split adds about a five-minute delay for each one, just due to the way Bento in the back end processes different events in the queue and stuff like that. So what this means is if you do something like a thanks for ordering email, adding a five-plus minute delay to that is not ideal. And so having a Magic Split before that first email gets sent is really important if you want the person to receive their thank you email as quickly as possible. And then the other advantage or consideration is that whenever you have Tanuki help you with a flow, it will be building Magic Splits.

But you do you when you're building these. We'll get more practice with the Magic Splits as we go, and it's perfectly fine to use the regular split when you're just getting started if the Magic Split feels overwhelming So one little note for you with regards to building your flows out. At the top right here, there's this draft versus live status. So basically, when it's in draft mode, none of the emails will get sent, and I don't think even the triggers will fire.

So the draft mode is good for when you're first fleshing stuff out, and you don't want events to accidentally get called. But from the moment where you're ready to start properly testing it, you'll want to switch it to live mode. And to me, the main milestone for me deciding if I switch from draft to live in my own flows is, will this flow accidentally get triggered for a real user? So if you have a trigger event that's maybe something really generic, like let's say subscribe as your trigger event, that's risky to switch into live mode because if a new user subscribes while you're playing with this, they will get whatever work in progress stuff you have.

So if you're building something for that, what I would usually do, let's say that you are literally doing one for subscribe. So let me find it real quick. Okay, so let's say you do a custom event and... Oh, let's actually not do a custom event.

Let's just do the default here, and you do subscribe. And then let's say that you're going to send an email. Let's say this is your flow that you want, which probably this would be not a good idea. You shouldn't build this flow because a lot of people will get emails who you wouldn't want, but pretend it was.

What I would personally do if I were doing this, and we'll talk more about this later, I would create another trigger that's my debug mode trigger that would be called something like test whatever. And I would temporarily disconnect the subscribe one, and I would make a little note that's like, "Zach, to-do, reconnect this when done." I do this all the time. And so what this will mean is that you can safely publish this because all the new subscribers hitting the subscribe event, they're just having nothing happen. Something like this where it ends with nothing at all is the equivalent of if we did-- Where is it?

I have to find the... There's one for ending the flow. Here we go. End session.

So nothing at all after a card is the exact same as this mark complete one. And so in this case, it would allow us to have this in live mode, which is important from a testing perspective, and also not worry about normal users hitting it. So we could just fire this event for our testing user and make sure everything's solid, and then once it is, then we can just connect this, and it should all work. But alas, I don't want any of this.

So let's delete that. Save it. I have some notes in here on how to use Tanuki. It's just over here on the left-hand side.

You can ask it for whatever you like. I don't personally ever use Tanuki in flows, and we won't be doing it much in this training. But it's still useful if you're struggling with a blank page, and it can scaffold out some of the stuff for you. A few other things I wanted to just flag as a preview.

You can have some flows cancel other flows. So a moment ago when you saw me going into the splits and logic, and I did end session, there's this other one called end flow. And with this one, you can actually choose a different flow to cancel all sessions for the current user of. Where you would use this is imagine someone's in some sort of abandoned cart sequence, or more specifically, an abandoned cart flow.

So instead of building a proper sequence, you did it here in a flow where you literally had a delay, and you say, "Wait two days." If you had this, and somebody bought during that two days, and let's say that flow is called abandoned cart flow. And then you're over here in the product purchase flow. You can, from the product purchase flow, choose the abandoned cart flow in the end flow, and you can actually kill that abandoned cart once they purchase, which is really useful. So instead of them waiting the rest of those two days, it'll just cancel it.

So that's a nifty thing. And then I already mentioned this one. You can pass event data further down from chained events. We went through that.

We talked about the dynamic event name. So I think you've got a pretty clear map. And in the coming lessons, it'll be a lot more clear and comfortable as we do some practice and simple builds and ease into more complex stuff. So let's keep it going, and I'll see you in the next lesson.