Weekly
Turn new words in your vocabulary sheet into Anki flash cards
Every Sunday the new words in your Vocab sheet get a translation, pinyin and an example sentence, and a ready-to-import Anki file is saved to Drive.
- Runs
- Weekly
- Apps
- Google Drive, Google Sheets
- AI
- Yes, uses the built-in AI allowance
- Access
- Sheets read+write; Drive write
Send this to your assistant
Create a ClickRuntime automation: every Sunday, take the new words in my Vocab sheet, add the translation, pinyin and an example sentence, and save an Anki CSV to my Drive.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A student learning Mandarin jots down new words in a Google Sheet during the week, from classes, shows and menus. Turning them into flash cards means looking up each one, finding an example sentence and typing it all into Anki, so the list keeps growing and the cards never get made.
Filling in the details and producing an import file once a week means the words you collect become cards you actually review.
What you get out of it
Collect words in seconds
Just type the word into the sheet when you meet it. The details are filled in later.
Cards with context
Each card has an example sentence, which makes words easier to remember than a bare translation.
One import a week
A single file each Sunday adds the week's words to Anki in one step.
Your sheet becomes a full glossary
Translations and examples are written back to the sheet, so you have a searchable record too.
How it works
What happens, step by step
Every Sunday ClickRuntime reads your Vocab sheet and picks out the words that have no translation yet.
AI adds a translation, pinyin and a short example sentence for each new word.
The details are written back into your sheet next to each word.
A CSV file of the new cards, ready to import into Anki, is saved to your Drive folder.
Before it runs live
- Connect Google Drive
- Connect your Google Sheets account and pick the spreadsheets it may use
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 Drive and Google Sheets steps into one automation
Under the hood
The code that runs this automation
import csv, io, json
from datetime import date
from clickruntime import on_trigger, credentials, http, ai
SHEET, FOLDER = "your-spreadsheet-id", "your-flashcards-folder-id"
S = f"https://sheets.googleapis.com/v4/spreadsheets/{SHEET}/values"
SCHEMA = {"type": "object", "properties": {"cards": {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}}, "required": ["cards"]}
@on_trigger
def run(event):
h = {"Authorization": f"Bearer {credentials.connection('google', 'work')}"}
rows = http.get(f"{S}/Vocab!A2:D", headers=h).json().get("values", [])
new = [(i, r[0]) for i, r in enumerate(rows, start=2) if r and len(r) < 2]
if not new:
return {"new": 0}
words = "\n".join(w for _, w in new[:60])
cards = ai.generate(f"For each Mandarin word give [translation, pinyin, example sentence], same order:\n{words}",
json_schema=SCHEMA, max_output_tokens=2000).json["cards"]
data = [{"range": f"Vocab!B{i}:D{i}", "values": [c[:3]]} for (i, _), c in zip(new, cards)]
http.post(f"{S}:batchUpdate", headers=h, json={"valueInputOption": "RAW", "data": data})
buf = io.StringIO()
csv.writer(buf).writerows([w, f"{c[1]}<br>{c[0]}<br>{c[2]}"] for (_, w), c in zip(new, cards))
http.post("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart", headers=h, files={
"metadata": (None, json.dumps({"name": f"anki-{date.today()}.csv", "parents": [FOLDER]}), "application/json"),
"file": ("cards.csv", buf.getvalue().encode(), "text/csv")})
return {"cards": len(cards)}FAQ
Common questions
Does it only work for Mandarin?
How do I get the cards into Anki?
Will it re-make cards for old words?
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
Turn video ideas in a sheet into finished videos in Drive
Every hour the next ready idea in your Videos sheet becomes a video in your Drive, with the link and status written back to the sheet.
See how it worksTurn a sheet of topics into article drafts in Drive
Each day the next topic in your Content sheet becomes a 1,000-word article draft in Google Docs, with its link added to the sheet.
See how it worksLog job postings that match your CV in a sheet
Each morning, new postings from your job feeds are scored against your CV and the good matches are added to your Jobs sheet.
See how it worksKeep exploring
Set up “Turn new words in your vocabulary sheet into Anki flash cards” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.