How to build a Telegram flashcard bot with spaced repetition

By the Botable team

A Telegram flashcard bot sends you cards to review at the moment you are about to forget them. You rate how well you knew each one and the schedule adapts. Describe your decks and Botable builds the review engine.

What is a flashcard bot?

A Telegram flashcard bot applies spaced repetition, which is the only well-evidenced idea in study software: reviewing an item just before you would have forgotten it produces far more retention per minute than reviewing everything equally often. Each card carries an interval and an ease value; answering well multiplies the interval and answering badly collapses it, so easy cards drift out to months while difficult ones stay in daily rotation. Delivering that through a chat solves the compliance problem that defeats most study apps, because the review arrives instead of waiting to be opened. Two things determine whether it survives past a fortnight: a daily cap, since an unlimited backlog after a missed week is where people quit, and a genuine self-rating rather than a binary right or wrong, because the interval calculation is only as good as the honesty of the input.

What commands does it have?

Commands a flashcard bot typically has, and what each one does
CommandWhat it does
/add <front> | <back>Creates a card in the current deck
/reviewStarts today's due cards
/decksLists decks and how many cards are due
/statsRetention rate and review history
/cap 20Caps how many cards a day it will send

What do you need before you start?

  • A Telegram bot token from @BotFather
  • Your cards, or a topic the bot can generate them for
  • A daily cap you will actually keep to

How do you build it?

How does spaced repetition schedule a card?

Each card has an interval and an ease. Rate a review well and the interval multiplies; rate it badly and it drops back to minutes. Over weeks, cards you know leave the rotation and cards you do not stay in it, which is the entire efficiency gain.

Why rate on a scale instead of right or wrong?

Because "I got it but barely" and "instant" should produce different intervals. Four buttons — again, hard, good, easy — carry enough signal. A binary answer collapses the schedule to something not much better than a fixed rota.

What happens after a week away?

A backlog, and it is where most people abandon a study tool. Ask for a daily cap and for overdue cards to be spread across several days rather than dumped at once. A 300-card morning is a quit event.

Does the delivery method actually matter?

It is most of the benefit. A scheduled prompt in a chat you already have open removes the step where you decide to study, which is the step that fails. The algorithm is well understood; getting the review in front of someone is the hard part.

A prompt you can use as-is

Paste this into Botable and adjust the details. It is specific on purpose — a vague description produces a vague bot.

Build a flashcard bot with spaced repetition. /add <front> | <back> creates a card in the active deck, /deck <name> switches decks. /review sends due cards one at a time: show the front, reveal the back on tap, then four rating buttons — again, hard, good, easy — which adjust that card's interval and ease. Cap reviews at 20 a day by default and spread any overdue backlog across several days rather than sending it at once. Prompt me once a day at a time I choose, in my timezone. /stats shows retention rate and cards due per day for the next fortnight.

Build this bot

Who is this bot for?

  • Language learners who need daily contact more than daily hours
  • Students revising for exams with a fixed body of material
  • Anyone memorising terminology for work

What goes wrong with this kind of bot?

  • No daily cap means one missed week produces a backlog nobody clears
  • Binary right/wrong ratings degrade the schedule to something barely better than random
  • Scheduled reviews need a timezone, which has to be collected explicitly

Questions about flashcard bots

Can it generate cards for me?

Yes — give it a topic or paste text and cards can be generated rather than typed. Review them before studying, because a wrong card learned well is worse than no card.

Can I import an existing deck?

Yes, if you can supply it as a list or CSV of front and back pairs. Say the format when you describe the bot and the import path can be built with it.

All twelve build guides