Supabase Sync

Supabase Sync keeps your Virlo research in your own Supabase database. Your agents' videos, creators and runs land as Postgres tables and stay up to date after every run, ready for your own apps, dashboards and AI agents.

At a glance
What it does
Writes your agents' data into tables in a Supabase project you own, and keeps it current.
You do
Connect Supabase, pick a project, choose what syncs.
You get
Five virlo_* tables: agents, videos, daily views history, creators and runs.
Cost
Included in every paid Virlo plan. No credits are used.
How fresh
Within 30 minutes of each agent run finishing, or right away with Sync now.

What you get

An export gives you a file. Supabase Sync gives you tables that keep themselves current:

  • Numbers refresh in place. A video's views, likes and shares update on the same row each sync.
  • History builds up. virlo_video_stats adds a row per video per day, so you can chart how a video grew.
  • Everything joins. Videos link to their creators and to the agents that found them, and you can join all of it with your own tables.
  • It's your database. Query it with SQL, supabase-js, Supabase's REST API, or any Postgres tool.

Set it up

  1. In Virlo, open Automations > Apps and choose Supabase under Your data. Or start from one agent: open its Export dialog and press Connect on Keep it in Supabase.
  2. Supabase asks you to approve Virlo. Approve it for the organization that holds your project.
  3. Back in Virlo, pick the project and what syncs, then press Create tables and sync.

Virlo creates its tables in that project and starts the first sync. Open your project's Table Editor to see rows arrive as each agent finishes. If you started from an agent's Export, that agent is written first and Virlo takes you back to it.


What syncs

You choose one of two options when you connect, and you can switch any time on the Supabase card:

OptionWhat it sendsWhen
EverythingEvery agent in the workspace you connected from. New agents are included automatically.Within 30 minutes of each run finishing.
Agents I chooseOnly the agents you add. Add one from its Export dialog (Keep it in Supabase > Add). Automations whose Where is Supabase add theirs too.Within 30 minutes of each run finishing, and each time such an automation runs.

Connecting from an agent's Export starts with Agents I choose and just that agent selected, so one agent stays one agent. Switch to Everything at any time.

Sync now on the card sends everything it covers straight away, even if nothing new ran.


The tables

All five tables are in the public schema. Each one also has first_synced_at and synced_at, and every column has a comment you can read in the Table Editor.

virlo_agents

One row per agent. Key: agent_id.

ColumnTypeDescription
agent_iduuidThe agent id in Virlo.
nametextAgent name.
kindtextrecurring or one-time.
keywordstext[]Keywords the agent searches.
platformstext[]Platforms the agent covers.
intenttextWhat the agent researches, from its brief.
video_countintegerVideos the agent has collected.
last_run_attimestamptzWhen its latest finished run started.
virlo_urltextOpens the agent in Virlo.

virlo_videos

One row per video. Key: video_id. Its numbers update on every sync.

ColumnTypeDescription
video_idtextThe video id in Virlo.
platformtexttiktok, youtube or instagram.
urltextLink to the video.
platform_video_idtextThe platform's own id.
published_attimestamptzWhen it was posted.
duration_secondsnumericLength in seconds.
views, likes, comments, shares, savesbigintNumbers at the latest sync.
captiontextThe post caption.
hashtagstext[]Hashtags in the caption.
is_outlierbooleanBeat the creator's usual views.
outlier_rationumericViews divided by the creator's typical views.
virality_scorenumericVirlo virality score.
thumbnail_urltextCover image.
transcripttextWhat is said in the video, when available.
sound_idtextThe sound used, when known.
regiontextRegion the video was found in.
creator_id, creator_username, creator_followerstext, text, bigintThe creator. creator_id joins to virlo_creators.
hook_texttextThe opening line or on-screen hook.
content_formattextFormat, for example talking head or tutorial.
primary_topictextMain topic.
intelligencejsonbEvery Data Intelligence field for the video.
agent_idsuuid[]The agents that collected it. Joins to virlo_agents.
first_collected_attimestamptzWhen an agent first collected it.

virlo_video_stats

One row per video per day it was synced. Key: video_id, day. Columns: video_id, day (date, UTC), views, likes, comments, shares.

virlo_creators

One row per creator. Key: creator_id. Columns: platform, username, display_name, profile_url, followers, verified, country, is_outlier_creator, avg_views, median_views, outlier_ratio, top_video_views, posts_per_week, content_angle, agent_ids.

virlo_agent_runs

One row per run. Key: run_id. Columns: agent_id, run_number, status, started_at, completed_at, new_videos, outliers_found, total_videos_after, total_views_after.


Example queries

This week's top videos across all your agents

select caption, creator_username, views, outlier_ratio, url
from virlo_videos
where published_at > now() - interval '7 days'
order by views desc
limit 20;

Hooks that over-perform, by format

select content_format, count(*) as videos, round(avg(outlier_ratio), 2) as avg_outlier
from virlo_videos
where outlier_ratio is not null
group by content_format
order by avg_outlier desc;

One video's growth, day by day

select day, views
from virlo_video_stats
where video_id = '<video_id>'
order by day;

Videos from one agent

select v.caption, v.views, v.url
from virlo_videos v
join virlo_agents a on a.agent_id = any (v.agent_ids)
where a.name = 'My agent'
order by v.views desc;

From your app with supabase-js (after you add a read policy, see below)

const { data } = await supabase
  .from('virlo_videos')
  .select('caption, views, url')
  .order('views', { ascending: false })
  .limit(10)

Access and security

  • Row level security is on for every virlo_* table, with no policies. Your project's public (anon) key can read nothing until you add a policy, for example create policy "read" on virlo_videos for select to authenticated using (true);.
  • What Virlo can do. You approve Virlo through Supabase's own consent screen. Virlo uses that access only to list your projects and to create and write its own tables in the project you pick.
  • What Virlo stores. The access token Supabase issues, encrypted, and nothing else from your account. Virlo never asks for your database password or service key.
  • Revoking. Remove Virlo from your organization's settings in Supabase at any time. Syncing stops at once and the Supabase card in Virlo asks you to reconnect.

Disconnecting

Choose Disconnect on the Supabase card. Virlo deletes its access token and stops syncing. Your tables and their rows stay in your project: they are yours. Delete them whenever you like.

To sync again later, connect the same project. Virlo picks up where it left off and your automations keep working.


Questions

Which plans include it? Every paid Virlo plan. On a trial, the card shows the sync waiting and starts once your plan is active.

Does it use credits? No. It sends data your agents already collected.

Which workspace syncs? The one you connected from, and the connection only shows in that workspace. Connect again from another workspace to sync that one too, even into the same project.

Can I sync to more than one project? Yes. Connect Supabase again and pick another project.

Something failed. The Supabase card says what went wrong in plain words and when your tables last updated. Most failures, such as a paused project or a revoked approval, are fixed by restoring the project or reconnecting.

Was this page helpful?