Online
Bento

Bento Supabase Integration

Background Pattern
Bento Logo
Vendor Icon

Overview

This integration uses Supabase Edge Functions to track subscriber events in Bento and send transactional emails through the Bento API.

Requirements

  1. Active Bento account with a site created
  2. Active Supabase account
  3. A front-end application with a URL that handles the email verification link

Installation Steps

1
Generate Bento API keys
To generate your keys visit your team page here, and select Your Private API Keys button at the top right
2
Supabase Edge Function Secrets

Create the following edge secrets to support the functions using the Bento API and Supabase Keys.

3
Customize and deploy edge functions

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.

4
Verification Bento Flow (optional)

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. Look for the $user_confirmed event, which signals that a user has verified their email address through the confirmation process. Depending on your use case, the events will carry other data, such as email address, user ID, confirmation timestamp, and any custom user fields you've configured. You can also create and trigger your own events from your application.

These event details will be valuable as data to use in Bento flows for sequences, welcome campaigns, and user analytics.

Sample Event