> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serpyseo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Supabase

Use the Supabase integration if your website stores content in Supabase.

## How to connect Supabase

1. Go to Settings.
2. Open Integrations.
3. Choose Supabase.
4. Click Connect.
5. Enter the required Supabase project details.
6. Add the required key or credentials.
7. Choose the table or content destination if needed.
8. Save the connection.
9. Test publishing with a draft article.

<video src="https://mintcdn.com/serpy/hfdj6DEmVn8XP6l0/videos/supabaseintg.mp4?fit=max&auto=format&n=hfdj6DEmVn8XP6l0&q=85&s=74c8a3f755037080197f5e566def20b1" autoPlay loop muted playsInline width="100%" style={{ borderRadius: "12px" }} data-path="videos/supabaseintg.mp4" />

Enter the following code in the SQL Editor if you did not have a blog/posts table created yet:

```json theme={null}

 create table public.posts (
  id bigint generated by default as identity primary key,
  title text not null,
  slug text not null unique,
  content text,
  excerpt text,
  status text not null default 'draft',
  published_at timestamptz,
  created_at timestamptz not null default now(),
  updated_at timestamptz not null default now()
);

alter table public.posts enable row level security;
```

If your website will retrieve published posts directly from Supabase, also run this policy:

```json theme={null}

 create policy "Public can read published posts"
on public.posts
for select
to anon, authenticated
using (status = 'published');
```

If you get a connection access error that looks like this:

!\[Strategy Screen]\(/images/Supabase\_Integration---connection-error.png)

Then run this code in the SQL editor:

```json theme={null}

grant usage on schema public to service_role;
grant select on table public.posts to service_role;
```

## Tips for Supabase

This integration is best for technical teams.

Make sure your database table is prepared to receive article content.

Use the correct permissions for publishing content.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.