Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

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 ​

  1. Connect Supabase in WeWeb.
  2. Create an API Endpoint for the logic you want to protect.
  3. Add Supabase actions inside that API.
  4. Secure the API and call it from the Interface.

1) Connect Supabase ​

  1. Open Integrations.
  2. Add Supabase.
  3. Connect the right project for your environment.
  4. 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:

  1. Go to Data & API → API Endpoints.
  2. Create a new endpoint.
  3. Add the inputs your interface will send (for example id, status, or note).

3) Add Supabase actions ​

Inside the API Endpoint, add the Supabase action that matches your use case.

Common options:

  • Database | Select To retrieve rows
  • Database | Insert To create rows
  • Database | Update To change rows
  • Call Postgres Function When you already have logic inside Supabase
  • Invoke Edge Function For custom server-side logic hosted in Supabase

Then:

  1. Bind your API inputs into the Supabase action.
  2. Add any checks or extra steps you need.
  3. End with Send response so 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:

  • Authenticated When users must be signed in
  • Middleware when you want to check ownership or more complex rules

One common pattern is:

  1. Keep Supabase as the source of truth for the data.
  2. Use WeWeb API Endpoints to decide what the interface is allowed to retrieve or change.

5) Call it from the interface ​

  1. Open an interface workflow.
  2. Add your API Endpoint action.
  3. Pass the values it needs.
  4. 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.