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.
Steps at a glance ​
- Connect Supabase in WeWeb.
- Create an API Endpoint for the logic you want to protect.
- Add Supabase actions inside that API.
- Secure the API and call it from the
Interface.
1) Connect Supabase ​
- Open
Integrations. - Add
Supabase. - Connect the right project for your environment.
- Confirm you can see the tables or actions you need.
2) 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
Data & API→API Endpoints. - Create a new endpoint.
- Add the inputs your interface will send (for example
id,status, ornote).
3) 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.
4) 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.
5) 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.

