Add Notion-synced shift reminders - #303
Open
Flaryiest wants to merge 5 commits into
Open
Conversation
Flaryiest
force-pushed
the
feat/notion-shift-reminders
branch
from
July 23, 2026 21:16
7ff0034 to
0335aac
Compare
geoff-jiang
approved these changes
Jul 30, 2026
geoff-jiang
left a comment
There was a problem hiding this comment.
@Flaryiest Preeemmmmm looks good. Just one last thing - I feel like this feature is somewhat unintuitive and slightly complicated so it would be helpful if added this to the documentation on Notion: https://app.notion.com/p/nwplus/Factotum-Setup-16b14d529faa80e88b42e15e2a67096f?source=copy_link
Could you please add a section that includes:
- How it works
- Reminder behaviour (when they are sent, error logging, shifts that already started)
- the /link-email command
- The firestore structure (shifts, reminders, organizerMappings)
- guild configuration (hackathonName needs to match doc ID)
- reminder configuration doc (channelID and paused)
- day-of setup and things to check before luanch
Also, I believe the actual staging branch is 'develop', not 'dev' (the codeql-analysis.yml triggers on 'develop'). No need to change the destination branch on this PR, we can just merge to main after and update develop. Just a note for the future 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Factotum now pings organizers in Discord 10 minutes before their shift starts.
The schedule comes straight from Notion (mirrored into Firestore), replacing
the CSV upload flow.
Description
New Feature.
Notion is now the single source of truth for the shift schedule. A Cloud
Functions sync (separate repo) mirrors the active Notion shift database into
hackathons/{hackathonId}/shifts, and Factotum just reads that mirror. Every5 minutes the bot sweeps upcoming shifts and schedules a ping in
#shift-reminders at T-10, mentioning organizers who linked their email.
Sent-state lives in a separate
reminderscollection so Notion edits cannever cause duplicate pings, and shifts deleted or moved in Notion cancel or
reschedule their pending reminder automatically.
Note: reminders only start firing once the Notion sync (Part 2, separate
repo) is deployed.
Why
The CSV flow never made it to prod, and using it would have meant exporting
and re-uploading the schedule every time it changed, with the two copies
drifting apart. Logistics already maintains the schedule in Notion, so the
bot should just read from it. Better to swap this out before anyone starts
using the CSV flow.
User Changes
/link-email: links your Notion email to your Discord account soreminders can mention you. Ephemeral, organizer/admin/staff only; admins
can link on someone else's behalf and re-link a taken email.
reminderChannelIdin Firestore). Missed or failed reminders are reportedin the admin log;
paused: truestops pings without a redeploy./upload-scheduleis removed.Tests Done
paths; deleting a shift before its ping cancels it; moving a start time
reschedules it (verified nothing fires at the old time).
/link-emailclick-through in the dev guild: fresh link and re-link of ataken email, both verified in Firestore.
Breaking Changes
/upload-scheduleand the CSV parser are gone. The old command is stillregistered on the bot account and needs a manual removal.
command-data/shift-schedule/shiftsis ignored(inert, safe to delete).