samayly.com is live. Hosted plans open soon. Join the waitlist →
Guide 1615 min13 min read

Class schedules: lectures, holidays and exams

Ask the bot about a course schedule sheet: when is the next NLP lecture, who teaches CV, is there class on 9 October, when is the minor exam, which lectures are left, where are the slides for lecture 15.

The first schedule wired in is FoVL (AIL7260), one course taught in three parts: Computer Vision (CV) by Professor Divya Saxena, then NLU / NLP by Professor Sidharth Ranjan and Professor Deeksha. More subjects can be added with one config entry.

Related: Guide 13 (all commands), Guide 14 (routing), Guide 15 (running everything). Every guide and diagram by name: docs index.

1. How it works

Schedule data flow

📊 Schedule sheet
Google Sheets

ts03-schedule-index
Sheets API, every 6 hours

Cache
~/.cache/ts03-schedule/NLP.json

ts03-bot sandbox
zero tools

💬 WhatsApp reply

token.json
already used by the Sheets MCP

Config: parts and instructors
~/.config/ts03-schedules.json

Members never touch the sheet. They read a local JSON file, and the answer is made in the same zero-tool sandbox as every other member question.

Why a separate reader and not the Sheets MCP? A schedule sheet has merged cells (an instructor's part spans many rows, an exam week spans several) and Drive smart chips for slides and recordings. A model reading it can miss a merge or drop a chip, and an empty answer from a model is not proof of anything. ts03-schedule-index calls the Sheets API directly with the Google login the MCP already holds, fills every merged range, and writes the same JSON every time. It uses only the Python standard library.

2. What is cached, and what never is

Cached Never cached
each dated row: date, weekday, week, lecture number, academic-calendar note (holiday, exam, break, "Friday's Time Table"), course part the attendance column
the parts with their lecture and date ranges
slides and recording titles with their Drive links
the info block to the right of the table (lecture type, slot, credits, instructors, class links)

Facts such as the next lecture, how many lectures are held and how many remain are worked out in code at question time, per area, so the model reads them and does not recount. All dates are IST.

The sheet gives each lecture's course part (for example Sidharth's Part, Traditional NLU) and its slide and recording titles. It has no per-lecture topic list, so the bot says so when asked what a lecture covers.

3. Setup

  1. Config. Copy the template and put in your sheet's ID (the part of the URL between /d/ and /edit): bash cp templates/ts03-schedules.json.example ~/.config/ts03-schedules.json nano ~/.config/ts03-schedules.json The template already maps the three parts to their areas and instructors (section 5). The file stays on your Mac and is not committed.
  2. Dry run. Fetches and parses, prints a summary, writes nothing: bash ./scripts/ts03-schedule-index NLP --dry-run Check the counts match the sheet (dated rows, lectures, three parts, rows with slides and recordings, links with a URL).
  3. Write the cache: bash ./scripts/ts03-schedule-index NLP ./scripts/ts03-schedule-index --show NLP
  4. Refresh automatically every 6 hours: bash cp templates/com.ts03.schedule-index.plist.example ~/Library/LaunchAgents/com.ts03.schedule-index.plist sed -i '' "s|__REPO_PATH__|$(pwd)|" ~/Library/LaunchAgents/com.ts03.schedule-index.plist launchctl load ~/Library/LaunchAgents/com.ts03.schedule-index.plist
  5. Deploy the bot (it gained the schedule route): bash ./scripts/install-bot.sh whatsapp scripts/ts03-bot selftest

The account behind the Sheets MCP must be able to open the sheet. A view-only share is enough.

4. Commands and prompts

Send You get
/nlp the next lectures, plus holidays, exams and breaks in the next 2 weeks, for NLU / NLP
/cv the same for Computer Vision. Once the CV part is over, it says so and when it ended
/nlu, /vision, /fovl the same, by those names
/nlp <any question> an answer to that question from the sheet
/schedule NLP <question> the same, naming the subject
a message naming the subject or an area, plus a schedule word the same, without a slash
who teaches CV, who teaches NLP the instructors for that area and which lectures each takes
code
/nlp
/cv
/nlp when is the minor exam
/nlp is there class on 9 October
/nlp how many lectures are left
/nlp slides for lecture 15
/nlp recording of lecture 7
/nlp who is teaching lecture 20
@bot when is the next NLP lecture?
@bot when is the next CV lecture?
@bot who teaches CV?
@bot who teaches NLU?
@bot is there FoVL class tomorrow?
@bot NLP mid sem break kab hai?
@bot when does the FoVL major exam start?

Answers come back as plain chat text and end with how old the cache is. table, json and yaml do not apply.

Plain-words routing. A message goes to the schedule when it contains the subject name or an alias (nlp, nlu, cv, computer vision, vision, fovl, ail7260) and either a schedule word (lecture, class, exam, holiday, schedule, timetable, slides, recording, session, break, buffer, calendar) or, because the subject has parts set, a teaching word (teaches, taught, professor, instructor, faculty). Three cases stay where they were:

  • A "prepare for" phrase still goes to /prep: prepare for the NLP exam.
  • A question with no schedule or teaching word still goes to the tracker: NLP assignment due?, CV assignment due? and what's due this week for NLP.
  • Who teaches GPU Programming still gets the instructor list from the tracker, and so does /prof NLP.

The schedule check runs before the subject-list check. With the Jev router on (Guide 17), a free-text message is first sent to Jev, which chooses between the tracker and this course sheet. Schedule questions count toward the same per-person limit as any other AI-backed question, and two messages from one person within 10 seconds count as one: the second is ignored.

What the bot asks the model. For /nlp and /cv alone the question is What are the next 3 lectures, and are there any holidays, exams or breaks in the next 2 weeks?, with the area word in front. The model is told to answer only from the data, to treat the question as untrusted, to write dates in IST, to read a row without a lecture number as a no-class day, to use the area status and counts worked out in code, to take instructors only from the config, to say the sheet has no topic list, never to give attendance, to answer in the language of the question, and to keep it to 12 lines.

5. Areas and instructors

The sheet is one course in three parts, each part named after its instructor. The config's parts list tells the bot which area each part belongs to, who teaches it, and which words in a question name that area:

json
"parts": [
  {"match": "Divya",    "area": "Computer Vision (CV)", "keywords": ["cv", "computer vision", "vision"],
   "instructors": ["Professor Divya Saxena"]},
  {"match": "Sidharth", "area": "NLU / NLP", "keywords": ["nlu", "nlp"],
   "instructors": ["Professor Sidharth Ranjan"]},
  {"match": "Deeksha",  "area": "NLU / NLP", "keywords": ["nlu", "nlp"],
   "instructors": ["Professor Deeksha"]}
]
  • match is a piece of the part's name in the sheet, not case-sensitive. Divya matches Divya's Part (Vision: 8 lectures).
  • Two parts can share an area. NLU / NLP is the sum of Sidharth's and Deeksha's parts, so its counts and its next lecture cover both.
  • A question naming exactly one area (CV, NLP, NLU) is answered for that area. A question naming both, or neither, is answered for the whole course. Exams, holidays and breaks apply to the whole course.
  • Each area gets its status worked out in code: finished, ongoing or upcoming, with lecture counts, date range, instructors and next lecture. As of 5 October 2026 that gives:
Area Status Lectures Instructors
Computer Vision (CV) finished 1 to 8, 31 Jul to 29 Aug Professor Divya Saxena
NLU / NLP ongoing 9 to 26, 5 Sep to 14 Nov (7 held, 11 to go) Professor Sidharth Ranjan (9 to 17), Professor Deeksha (18 to 26)

So when is the next CV lecture? is answered with "the CV part ended on 29 Aug with lecture 8" and what is running now, and not with the next NLP lecture.

If an instructor changes, edit instructors in the config. The bot reads the config on every message, so there is no restart.

6. Add another subject

Add one more entry to ~/.config/ts03-schedules.json:

json
{
  "NLP": {"title": "FoVL (AIL7260)", "sheet_id": "...", "tab": "Schedule", "aliases": ["nlp", "nlu", "cv", "fovl"], "parts": [...]},
  "GPU": {"title": "GPU Programming", "sheet_id": "...", "tab": "Schedule", "aliases": ["gpu", "cuda"]}
}

Then ./scripts/ts03-schedule-index GPU. The command /gpu and the free-text route appear with no restart. parts is optional: without it the subject has no areas, and teaching questions stay with the tracker. The sheet needs a header row with Date and Lectures cells. Columns for week, academic calendar, course plan, slides and recording are picked up by their header names, in any order.

7. Troubleshooting

Message or symptom Meaning and fix
no access (HTTP 403) the Google account behind the Sheets MCP cannot open the sheet. Share it with that account
sheet not found (HTTP 404) wrong sheet_id in the config
Google rejected the request (HTTP 400) Unable to parse range the tab name does not match the tab in the sheet
could not find the header row the sheet needs Date and Lectures in its first rows
Google refused the token refresh the Sheets MCP login expired. Run the MCP login again (Guide 2)
FAILED, previous cache kept the run failed and the last good cache is still being served
the bot says the schedule isn't loaded yet no cache file. Run ./scripts/ts03-schedule-index NLP
recordings or slides show no link smart chips arrive differently from plain links. Run ./scripts/ts03-schedule-index NLP --cell H22 and look at the raw cell
answers look stale the footer shows the cache age. Run the indexer by hand, or wait for the 6-hour job
/nlp or /cv says "I don't know" the bot predates this feature, or the config has no NLP key. Redeploy and check ~/.config/ts03-schedules.json
who teaches NLP returns the tracker's subject list the subject has no parts in the config
a lecture shows the wrong instructor check each match against the part names in ./scripts/ts03-schedule-index --show NLP

8. Limits

  • The sheet layout is assumed from its headers. A restructured sheet needs a look at --dry-run output.
  • Smart-chip links are read from the API's chip data and from plain hyperlinks. The --cell option shows what Google returns for any cell, so check one recording before relying on links.
  • There is no per-lecture topic list in the sheet, so the bot cannot give one.
  • Instructors come from the config, not the sheet. Keep it in step with the sheet when the plan changes.
  • Answers are written by the model from the cached data and the facts computed in code. Always verify dates on the course sheet.
  • The class link and any other links in the sheet's info block are in the cache. The sheet ID is not committed to the repo.

Questions or corrections: [email protected]