Hi Steven,
This is just a suggestion from our side, and more of a workaround than an official “one correct” architecture. It can probably be improved depending on your exact app setup, and hopefully other Bubble/Supabase users in the community can also suggest a cleaner approach.
The main challenge with link previews is that platforms like iMessage, Facebook, LinkedIn, Slack, etc. usually read the page’s metadata before the Bubble page has fully loaded dynamic data from Supabase. So even if the profile displays correctly for a normal user, the preview crawler may only see the generic Bubble page title/image/description.
One possible workaround is to cache only the public profile preview data from Supabase into Bubble.
For example, let’s say your Supabase profile table has:
profiles
- id
- slug
- display_name
- headline
- avatar_url
- updated_at
In Bubble, you could create a data type such as:
Cached Profile
With fields like:
supabase_id: text
slug: text
display_name: text
headline: text
avatar_url: text
supabase_updated_at: date
Then your Bubble profile page could have:
Type of content: Cached Profile
Copy
And your dynamic page metadata could use:
Title:
Current Page Cached Profile's display_name
Description:
Current Page Cached Profile's headline
Image:
Current Page Cached Profile's avatar_url
So the general idea would be:
Supabase = source of truth
Bubble Cached Profile = small public cache used for page metadata / link previews
When a user creates or updates their profile, you would update Supabase as usual, but also create/update the matching Cached Profile thing in Bubble.
Example workflow:
- User saves profile
- Update profile in Supabase
- Search Bubble for Cached Profile where supabase_id = Supabase profile id
- If found, update it
- If not found, create it
Then the profile URL should point to the Bubble cached profile record, for example:
/profile/steven-liu
or whatever URL structure you are using, so Bubble can resolve the current page’s Cached Profile and generate the correct metadata before the link preview crawler reads the page.
If profile data can also be changed outside Bubble, then instead of only syncing on profile save, you could run a scheduled backend workflow that fetches profiles updated after the last sync time from Supabase and updates the Bubble cache.
Again, this is only a suggested workaround. I would not recommend duplicating your whole Supabase database into Bubble. For this specific use case, you would only need to cache the public fields required for the preview, such as the profile name, short description/headline, slug, and image URL.
Best regards,
Zeroqode Support Team
Browse all Zeroqode Plugins for Bubble
