Hi, I’ve built integration with Google, and now wanted to have full syncing, implemented a webhook but i’m struggling with duplicates being created.
Could sb help me with those duplicates (no matter what conditions I put in the workflow steps the issue is still there, I’ve also tried to put some conditions for the workflow itself, but without success)?
Do you think the Google Calendar webhook is good solution here, or it’s better to create a workflow that will be checking all the events, creating, updating or deleting after some trigger, like opening a page etc…
I dont think that Google Calendar guarantees that it’ll send you only-once events. You have to shape your workflow so that it can handle duplicates.
Google should send you some sort of idempotency key, which you can use to know in the workflow if you’ve processed this event or not. It should look something like first checking if a Calendar Appointment in your data table has a field “lastupdatekey” that equals your idempotency key. If so, you can skip updating the database. If not, you know this is not a duplicate.
Hey @sywiab ! Both are classic integration challenges, here’s the short version:
1. Duplicates
The fix is almost always an upsert keyed on Google’s eventId instead of a plain insert. Before creating anything, check if that eventId already exists in your DB → update if yes, create if no. Also make sure you’re using Google’s syncToken so you’re only processing changed events, not all events on every webhook trigger. If you’re hitting race conditions, add a unique DB constraint on eventId as a safety net.
2. Webhook vs. Polling
Webhook is the better approach for real-time sync so keep it. The main gotcha is that Google webhook channels expire every ~7 days, so add auto-renewal logic or your sync will silently break. For resilience, pair it with a lightweight periodic full sync (on page load or hourly) to catch anything the webhook might miss.
TL;DR: Upsert on eventId + syncToken + webhook renewal = no more duplicates and a solid sync.
Duplicates with Google Calendar webhooks usually come from Google sending the same notification multiple times (it does this intentionally as a reliability mechanism). The fix is to make your workflow idempotent — before creating a new event in Bubble, do a search for an existing record that matches the Google event ID, and only create if that search returns empty. If you’re not storing the Google event ID on each Bubble record, that’s the first thing to add.
The webhook approach is solid and better than polling on page load — polling is slow and misses updates when users aren’t active. Stick with the webhook but add that duplicate-check logic.
A few things that would help me give more specific advice:
Are you storing the Google Calendar event ID on each Bubble record?
What does your “create event” workflow condition look like right now?