Appearance
Return
Set up backend logic on top of Supabase
Keep Supabase as your database and use WeWeb API Endpoints as the secure logic layer on top.
TEMPLATE AVAILABLE
If you wish to skip the manual setup, there is a workflow template available called Get data w/Supabase. You can find it inside the templates available when creating an API workflow.
RECOMMENDED SUPABASE MODE
This guide matches Supabase as data source only (the recommended option when you create your first Supabase table). In that mode, WeWeb manages API Endpoints and access control, and Supabase stays your database.
Steps at a glance ​
- Connect Supabase in WeWeb.
- Create a Supabase table in
Supabase as data source onlymode (or keep that as your default). - Create an API Endpoint for the logic you want to protect.
- Add Supabase actions inside that API.
- Secure the API.
- Call it from the
Interface.
1) Connect Supabase ​
- Open the
Data & APItab orInterfacetab, then openIntegrations. - Add
Supabase. - Connect the right project for your environment.
- Confirm you can see the tables or actions you need.
2) Create your Supabase table in the recommended mode ​
- Go to the
Data & APItab, then open theTablessubtab. - Click
Add Tableand chooseSupabase. - If asked
How do you want to use Supabase?, chooseSupabase as data source only. - Keep
Create API endpoints on your WeWeb server to access or update table dataenabled if you want starter endpoints. - Finish table setup.
3) Create a backend API for your logic ​
Create an API Endpoint when you want to do more than a simple direct table call.
Examples:
- Validate data before saving it
- Check who the current user is
- Update more than one table in one flow
- Return only the data your interface actually needs
To start:
- Go to the
Data & APItab, then open theBackend Workflowssubtab and go toAPI Endpoints. - Create a new endpoint (or start from a generated table endpoint).
- Add the inputs your interface will send (for example
id,status, ornote).
THESE WORKFLOWS RUN ON WEWEB
API Endpoints always run on your WeWeb server, not on your Supabase instance. That is expected, even when Supabase is connected.
4) Add Supabase actions ​
Inside the API Endpoint, add the Supabase action that matches your use case.
Common options:
Database | SelectTo retrieve rowsDatabase | InsertTo create rowsDatabase | UpdateTo change rowsCall Postgres FunctionWhen you already have logic inside SupabaseInvoke Edge FunctionFor custom server-side logic hosted in Supabase
Then:
- Bind your API inputs into the Supabase action.
- Add any checks or extra steps you need.
- End with
Send Responseso the interface receives a clean result.
5) Secure the endpoint ​
Before calling the API from the interface, open the Security panel and decide who can use it.
Common setup:
AuthenticatedWhen users must be signed in- Middleware when you want to check ownership or more complex rules
One common pattern is:
- Keep Supabase as the source of truth for the data.
- Use WeWeb API Endpoints to decide what the interface is allowed to retrieve or change.
6) Call it from the interface ​
- Open an interface workflow.
- Add your API Endpoint action.
- Pass the values it needs.
- Use the response to update the UI.
Common pitfalls ​
It works in preview but not in production ​
- Check that the correct Supabase project is connected for each environment.
The API returns no rows ​
- Check your filters first.
- If you rely on Supabase Row Level Security, make sure the current setup allows the operation.
You put all logic directly in the interface ​
- Move sensitive or reusable logic into an API Endpoint so users cannot change it from the browser.

