CalSnap delivers custom team calendar that are more detailed, clear, and usable. CalSnap deploys as a Cloudflare Worker (serverless function), connects to your TeamSnap account, and serves .ics
iCalendar subscriptions for each team.
“TeamSnap already has calendars! Why use this?”
While TeamSnap supports calendar subscriptions, events lack useful information, team names can be too long, and descriptions are messy.
CalSnap uses the TeamSnap API so that your calendars include:
- a custom team name (shorter or more descriptive)
- links to TeamSnap event pages
- arrival times (minutes early)
- event notes by team manager or coach
CalSnap Event List | TeamSnap Event List |
Leafs vs. Forest Hill Knights Leafs vs. North York Jets Leafs vs. East York Lynx |
North Toronto Leafs 2014 U12 AAA… North Toronto Leafs 2014 U12 AAA… North Toronto Leafs 2014 U12 AAA… |
CalSnap Event Details | TeamSnap Event Details |
Leafs vs. Forest Hill Knights GitHub Arena 101 Command Line Ave. |
North Toronto Leafs 2014 U12 AAA… 101 Command Line Ave. |
Away at Forest Hill Knights Uniform: White GitHub Arena Rink B Arrival: 1:20 PM · 40 min. Notes: limited parking TeamSnap event page link |
Location: GitHub Arena - Rink A Uniform: White (Arrival Time: 1:20 PM (Eastern Time (US & Canada))) |
- Workers & Pages ⇢ Create an application ⇢ Clone a repository
- Git repository URL:
http://github.com/andesco/calsnap
-
Create a Cloudflare Workers KV namespace with Wrangler CLI and note the new namespace ID:
git clone https://github.com/andesco/calsnap.git cd calsnap wrangler kv namespace create "CALSNAP_CALENDAR_STORE"
-
Update
wrangler.toml
with the new KV namespace ID and set your environment variables:[[kv_namespaces]] binding = "CALSNAP_CALENDAR_STORE" id = "{new KV namespace ID}"
-
Deploy with Wrangler CLI:
wrangler deploy
-
Note your new worker URL from the output:
https://calsnap.
{subdomain}
.workers.dev
-
TeamSnap authentication ⇢ Your Account ⇢ Your Applications ⇢ New Application
-
Name:
TeamSnap Custom Calendar
Description:Cloudflare Worker
Redirect URI:https://calsnap.
{subdomain}
.workers.dev
-
Client ID:
{your Client ID}
Client Secret:{your Client Secret}
- Workers & Pages ⇢
{worker}
⇢ Settings: Variables and Secrets: Add: - Type:
Text
Variable name:TEAMSNAP_CLIENT_ID
Value:{your Client ID}
- Type:
Secret
Variable name:TEAMSNAP_CLIENT_SECRET
Value:{your Client Secret}
- set your environment variables
wrangler.toml
:[vars] ALLOWED_USER_EMAIL = "{your TeamSnap email}" TEAMSNAP_CLIENT_ID = "{your Client ID}"
- Set your secrets with Wrangler CLI:
wrangler secret put TEAMSNAP_CLIENT_SECRET
- Open your Cloudflare Worker in a browser:
https://calsnap.
{subdomain}
.workers.dev
- Authenticate with TeamSnap.
Required Variable | Type | Description |
---|---|---|
ALLOWED_USER_EMAIL |
Text | TeamSnap email address authorized to use this calendar service. Only this user can access the service. |
TEAMSNAP_CLIENT_ID |
Text | Client ID from your TeamSnap OAuth application |
TEAMSNAP_CLIENT_SECRET |
Secret | Client Secret from your TeamSnap OAuth application. |