Daily
Prepare a lesson plan for each of tomorrow's classes
Each evening, every class in tomorrow's calendar gets a lesson plan document in Drive, linked from the calendar event.
- Runs
- Daily
- Apps
- Google Calendar, Google Drive
- AI
- Yes, uses the built-in AI allowance
- Access
- calendar.events; drive.file
Send this to your assistant
Create a ClickRuntime automation: every evening, look at tomorrow's lessons in my Google Calendar, create lesson plan docs for each in my Drive folder, and attach the link to the event.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A private tutor teaches eight or nine lessons a day across different subjects and levels. Each one needs a plan, and writing them happens late at night or not at all. In the morning, finding the right notes for each student means digging through folders between sessions.
This automation drafts a plan for every lesson in tomorrow's calendar the evening before and attaches it to the event, so the tutor opens the calendar, clicks the lesson and has the plan in front of them.
What you get out of it
Every lesson starts with a plan
A draft for each class means no lesson is improvised because the evening ran out.
Plans where you need them
The link sits in the calendar event, so the right plan is one click away when the lesson starts.
A starting point you can adjust
Plans are ordinary Google Docs, so you can edit them, add your own material or reuse them for another student.
An organised archive
All plans are filed in one Drive folder, named by date and lesson, which makes it easy to see what each student has covered.
How it works
What happens, step by step
Every evening ClickRuntime looks at tomorrow's lessons in your Google Calendar.
It skips any lesson that already has a plan linked.
AI writes a lesson plan for each one based on the event's title, description and length.
The plan is saved as a document in your Drive folder and its link is added to the calendar event.
Before it runs live
- Connect Google Calendar
- Connect Google Drive
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Google Calendar and Google Drive steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timedelta, timezone
from googleapiclient.http import MediaInMemoryUpload
from clickruntime import on_trigger, credentials, ai
FOLDER_ID = "your-lessons-folder-id"
@on_trigger
def run(event):
creds = Credentials(credentials.connection("google", "work"))
cal = build("calendar", "v3", credentials=creds, cache_discovery=False).events()
drive = build("drive", "v3", credentials=creds, cache_discovery=False)
day = datetime.now(timezone.utc).replace(hour=0, minute=0, second=0, microsecond=0) + timedelta(days=1)
items = cal.list(calendarId="primary", timeMin=day.isoformat(), timeMax=(day + timedelta(days=1)).isoformat(),
singleEvents=True, q="Lesson").execute().get("items", [])
made = 0
for e in items:
if "docs.google.com" in e.get("description", ""):
continue
plan = ai.generate(f"Write a lesson plan (goals, warm-up, main activity, practice, wrap-up) for: "
f"{e['summary']}. {e.get('description', '')}", max_output_tokens=1200).text
doc = drive.files().create(body={"name": f"{day:%Y-%m-%d} {e['summary']}", "parents": [FOLDER_ID],
"mimeType": "application/vnd.google-apps.document"},
media_body=MediaInMemoryUpload(plan.encode(), "text/plain"), fields="id,webViewLink").execute()
cal.patch(calendarId="primary", eventId=e["id"],
body={"description": f"{e.get('description', '')}\n\nPlan: {doc['webViewLink']}"}).execute()
made += 1
return {"lessons": len(items), "plans": made}FAQ
Common questions
How does it know what each lesson is about?
Which events count as lessons?
What is in each plan?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Create a prep doc before every sprint planning meeting
The day before each Sprint Planning event, a prep document with a drafted agenda is created in Drive and linked on the calendar event.
See how it worksGet a research brief before external meetings
Before each external meeting, a short brief on the other company is saved to Drive and the link is emailed to you.
See how it worksLet your voice or chat agent book appointments and answer from Drive
Your AI phone or chat agent can check your free times, book appointments in Google Calendar and answer questions from your FAQ document in Drive.
See how it worksKeep exploring
Set up “Prepare a lesson plan for each of tomorrow's classes” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.