← Projects
A Swarm check-in at Philz Coffee turning into a Google Calendar event
2025AutomationSelf-hosted

SwarmCalendar

Your Swarm check-ins, logged to Google Calendar — automatically.

Swarm (Foursquare's check-in app) already knows everywhere you go. SwarmCalendar quietly turns that stream into a calendar you actually own: every check-in becomes a timed event on a private Location History Google Calendar, so your past shows up next to your meetings — searchable, scrollable, and entirely yours. It runs as a single Cloudflare Worker on your own account; there's no app to open and no server to babysit.

How it works

  1. You check in on SwarmThe moment you do, Foursquare fires a push notification at the Worker's /webhook — no polling, no cron job waiting around.
  2. The Worker pulls the detailsIt calls the Foursquare API for the full check-in: venue name, address, the venue's timezone, your shout, and the public swarmapp.com link.
  3. It writes a calendar eventA 30-minute event lands on a dedicated “Location History” Google Calendar — titled with the venue, located at its address, your note in the description, all in the venue's own timezone.
  4. It never double-booksEvery event hides a swarm:checkin:<id> marker. Re-runs and backfills check for that marker first, so a given check-in is only ever written once.
  5. Backfill fills in the pastA /sync endpoint pages through your entire check-in history, twenty at a time, until nothing's left — so years of old check-ins show up too, not just today's.

What lands on your calendar

Jan 15, 2024 · 9:32 – 10:02 AM PST

Philz Coffee

3101 24th St, San Francisco, CA 94110

Great cortado this morning!

↳ View check-in · swarmapp.com/c/abc123

Thirty minutes by default, stamped in the venue's timezone — so a check-in in Tokyo reads as Tokyo time, not yours.

Yours, and private

Nothing routes through a third party. The OAuth tokens for Google and Foursquare live in your Cloudflare KV; the events live in your calendar, on a separate "Location History" calendar you can hide or delete in one click. SwarmCalendar is the only thing in the loop, and it's running on infrastructure you control.

Under the hood