# Calling Supabase RPC Functions in Wized

**URL:** <https://forum.finsweet.com/t/calling-supabase-rpc-functions-in-wized/7431>\
**Category:** Wized\
**Created:** [July 10, 2026, 8:58am UTC](https://forum.finsweet.com/t/calling-supabase-rpc-functions-in-wized/7431 "2026-07-10T08:58:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![littlegeniustoyspvtl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/littlegeniustoyspvtl/32/5658_2.png) [@littlegeniustoyspvtl](https://forum.finsweet.com/u/littlegeniustoyspvtl)\
**Post date:** [July 10, 2026, 8:58am UTC](https://forum.finsweet.com/t/calling-supabase-rpc-functions-in-wized/7431/1 "2026-07-10T08:58:01Z")

</div>

Hi Wized Team,

I’m using Wized with Supabase and would like to call a PostgreSQL RPC function directly instead of using a Supabase Edge Function. I couldn’t find a built-in way in Wized to execute a Supabase RPC.

---

<div class="post-metadata">

**Author:** ![Support-Finn](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-finn/32/5169_2.png) [@Support-Finn](https://forum.finsweet.com/u/Support-Finn)\
**Post date:** [July 10, 2026, 9:15am UTC](https://forum.finsweet.com/t/calling-supabase-rpc-functions-in-wized/7431/2 "2026-07-10T09:15:02Z")

</div>

Hey @littlegeniustoyspvtl!

Wized’s native Supabase connector doesn’t include a Database Function / RPC method — the **Invoke Function** method is specifically for Supabase **Edge Functions** only. Edge Functions and Database Functions are distinct in Supabase, so this is a known limitation, not something you’ve missed in the setup.

There are a few solid paths forward depending on your preference.

Option 1 — Access the Supabase JS client directly (recommended)

You can grab the underlying Supabase JS client from Wized and call `.rpc()` on it inside a custom code action:

```javascript
window.Wized = window.Wized || [];
window.Wized.push(async (Wized) => {
  const supabase = await Wized.requests.getClient('Supabase App');
  // Replace 'Supabase App' with your exact app name in Wized

  const { data, error } = await supabase.client.rpc('[your_function_name]', {
    [param1]: value1,
    [param2]: value2
  });

  if (error) console.error(error);
  console.log(data);
});

```

The key part is `supabase.client` — that gives you the raw `@supabase/supabase-js` instance, so any method from the JS SDK is available, including `.rpc()`. You can store the result in a Wized variable from there.

Option 2 — Use a REST Request node

Create a new REST Request in Wized with this config:

- Method: `POST`
- URL: `https://[your-project-ref].supabase.co/rest/v1/rpc/[your_function_name]`
- Headers: **apikey** , **Authorization** (Bearer token or user JWT), **Content-Type** : `application/json`
- Body: your function’s named parameters as JSON

This keeps everything visible inside the Wized request panel.

Option 3 — Wrap the RPC in an Edge Function

Create a thin Edge Function that calls your Database Function internally, then invoke it via Wized’s built-in **Invoke Function** method. Adds a layer, but keeps the connector config clean.

For most cases, Option 1 is the quickest win. Option 2 is great if you want the call manageable inside the request panel. Option 3 makes sense if you’re already standardizing on Edge Functions. 💪
