Bento Supabase Integration

Overview
The Bento Supabase Integration offers two core functionalities:
- Event Tracking: Automatically track key events for your subscribers in Bento
- Transactional emails: Send transactional emails to your subscribers
Requirements
- Active Bento account with a site created
- Active Supabase account
- Front end application with a URL to handle the verification
Installation Steps
Your Private API Keys
button at the top rightCreate the following edge secrets to support the the functions using the Bento API and Supabase Keys.

There are two sample edge functions included in the sdk. You can customize these to fit your use case. The
register-user
function is used to create a new user in Supabase and the verify-user
function is used to verify
a user after they click the confirmation link.

A common question is the use of Bento for confirmation emails. Bento does not offer SMTP server support. However these functions show how you can send confirmation and transactional emails from Supabase using the Bento API, and how you can send events from Supabase to Bento.
These functions are not production ready and are meant to be used as a starting point for your own implementation. They pass limited data and persist the bare minimum user data. You are expected to tailor them to your use case.
If you opt to use the verification bento event, you can connect it to a bento flow to start a user welcome flow or drip campaign.
How the connection works
When user registration events happen inside your application, those events are forwarded to Bento in the form of API calls through Edge Functions.
The sdk contains sample events for user onboarding, in these you will be looking
for the $user_confirmed
which signals that a user has successfully verified their email address through the confirmation
process. Depending on your use case there will be other data present or other events you create and trigger in your
application, such as email address, user ID, confirmation timestamp, and any custom user fields you've configured.
These event details will be valuable as data to use in Bento flows for sequences, welcome campaigns, and user analytics.
Sample Event
