Supabase integration
Your AI visibility data,
in your own Supabase.
PatchMySEO checks whether ChatGPT, Gemini, Perplexity and Google AI Overviews name your brand for the questions your customers ask. Connect your Supabase project and every check is copied into a table in your database, every hour, so you can chart it, join it with your own data, or alert on it.
What you get
One table, public.patchmyseo_ai_answers, with a row per check:
checked_at | When we asked |
site, question | Your site and the customer question |
engine | ChatGPT, ChatGPT Search, Google Gemini, Perplexity, Google AI Overview, Claude, Grok⦠|
named | Whether the answer named you |
named_instead | Who it named instead (JSON list) |
cited_urls | The pages the engine cited, when it shows them |
The last 90 days are copied when you connect, then new checks every hour. For example, your share of answers per engine this month:
select engine, round(100.0 * avg(named::int)) as pct_named, count(*) as checks from public.patchmyseo_ai_answers where checked_at > now() - interval '30 days' group by engine order by pct_named desc;
Set it up (about five minutes)
- In your Supabase project, open the SQL editor and run the SQL below. Change the password first. It creates the table and a login,
patchmyseo_sync, that can only read and write that one table.
-- PatchMySEO: one table for your AI answer checks, and a login that can only use that table.
-- Run all of it in your Supabase project's SQL editor (Ctrl+A, then Run). Change the password first.
create table if not exists public.patchmyseo_ai_answers (
id uuid primary key, -- the check's id in PatchMySEO
checked_at timestamptz not null,
site text,
question text not null,
engine text not null, -- ChatGPT, Google Gemini, Perplexity, Google AI Overview...
named boolean not null, -- did the answer name you?
named_instead jsonb not null default '[]', -- who it named instead
sentiment real,
cited_urls jsonb not null default '[]' -- pages the engine cited, when it shows them
);
-- Row level security with no policy for your app's users: the table isn't exposed through your API.
alter table public.patchmyseo_ai_answers enable row level security;
-- The login. Safe to run again: it only resets the password.
-- Letters and numbers only, so the connection string stays valid.
do $$ begin
if not exists (select 1 from pg_roles where rolname = 'patchmyseo_sync') then
create role patchmyseo_sync with login;
end if;
end $$;
alter role patchmyseo_sync with login password 'CHANGE-ME-letters-and-numbers-only';
grant usage on schema public to patchmyseo_sync;
grant select, insert, update on public.patchmyseo_ai_answers to patchmyseo_sync;
drop policy if exists "patchmyseo_sync writes" on public.patchmyseo_ai_answers;
create policy "patchmyseo_sync writes" on public.patchmyseo_ai_answers for all to patchmyseo_sync using (true) with check (true);- In Supabase, click Connect at the top of your project and copy the Session pooler connection string.
- In that string, change
postgres.yourprojecttopatchmyseo_sync.yourproject, and[YOUR-PASSWORD]to the password you set in step 1. - In PatchMySEO, open Learn & Support, find Supabase sync, paste the string and press Connect. We test it straight away.
Good to know
- Plans: Supabase sync is on Pro and Advanced. Works with any Supabase plan, including Free.
- What we can touch: only
patchmyseo_ai_answers. Thepatchmyseo_synclogin has no access to anything else in your database, and we refuse your mainpostgreslogin if you paste it by mistake. - Not exposed to your app's users: the table has row level security on and no policy for them, so it isn't readable through your Supabase API unless you add one.
- Your connection string stays private. We store it on our server and never show it again, not even to you.
- Turning it off: press Disconnect in PatchMySEO, or run
drop role patchmyseo_sync;after revoking its grants. Rows already copied stay in your database. - Help: email patchmyseo@zohomail.in.