Telegram Bot To‑Do List

Telegram To‑do List – Reply Keyboard + Inline Buttons

This automation blueprint lets you manage any Home Assistant to‑do list directly from a Telegram chat. It combines a friendly reply keyboard (bottom of the chat) with powerful inline buttons on the main list message.

This is the first attempt at creating a blueprint, so there may still be rough edges. If you run into any issues or unexpected behavior, please post in the thread and they will be addressed as soon as possible.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.


What this blueprint does

  • Adds items to a Home Assistant todo entity from plain Telegram messages (supports comma‑separated input on one line).
  • Skips duplicates automatically (case‑insensitive name comparison).
  • Shows the list in a single Telegram message with inline buttons:
    • tap ✅ item to mark it as completed;
    • toggle between “active only” and “all items” views;
    • clear all completed items.
  • Provides a persistent reply keyboard with these commands:
    • 📜 Show list – open list of active items;
    • 🛒 Active only – same as above, forced active‑only view;
    • 📜 Show all – show active + completed items;
    • 🗑 Clear completed – remove all completed items from the to‑do list;
    • 🔥 Clear all – remove every item from the selected todo list.
  • Keeps your chat clean: each reply‑keyboard command message is deleted right after being handled.

Prerequisites (do this before import)

  1. Update Home Assistant
  • Use Home Assistant 2025.11 or newer.
  • This blueprint relies on the new automation actions: syntax and on services such as todo.get_items, todo.update_item, todo.remove_completed_items.
  1. Configure the Telegram bot integration
  • Add the official Telegram bot integration from Settings → Devices & Services.
  • Make sure you have a working bot token and at least one chat where the bot can send messages.
  • Note the Config Entry ID of this bot (you can see it when creating a simple test automation that uses telegram_bot.send_message).
  1. Create or select a to‑do list
  • Ensure you have at least one todo entity (e.g. the built‑in Shopping List or any other todo. entity).
  1. Create a helper for the last message id
  • Create either:
    • an input_text (recommended) or
    • an input_number
  • This helper will store the message_id of the last inline list message, so the blueprint can edit that message instead of sending a new one every time.
  1. Plan your reply keyboard text
  • The blueprint expects the English labels below in the reply keyboard:
    • 📜 Show list
    • 🛒 Active only
    • 📜 Show all
    • 🗑 Clear completed
    • 🔥 Clear all

You will create the keyboard itself in a separate one‑time script/automation after importing the blueprint.


Inputs

When creating an automation from this blueprint, you will be asked for:

  • To‑do list entity (todo_entity)
    The todo entity that should be controlled (for example todo.shopping_list).
  • Telegram chat_id (telegram_chat_id)
    Numeric chat id where the bot will read and send messages (user or group).
  • List command (list_command)
    Telegram slash command that opens the list; by default /list.
    Behaves the same as pressing 🛒 Active only.
  • Bot Config Entry ID (bot_config_entry_id)
    The Config Entry ID of your telegram_bot integration (see prerequisites).
  • Last message id helper (last_message_id_helper)
    The input_text or input_number helper created earlier.

Installation steps

  1. Import the blueprint
  • Click the “Open your Home Assistant instance…” badge above or copy the link into a browser where you are logged into Home Assistant.
  • Confirm the import. The blueprint will appear under Settings → Automations & Scenes → Blueprints.
  1. Create an automation from the blueprint
  • Go to Settings → Automations & Scenes → Blueprints.
  • Choose Telegram To‑do List (EN).
  • Fill in:
    • todo_entity – your to‑do list;
    • telegram_chat_id – numeric chat id;
    • list_command – keep /list or change;
    • bot_config_entry_id – from the Telegram bot integration;
    • last_message_id_helper – the helper created earlier.
  • Save and enable the automation.
  1. Create the reply keyboard (one‑time)
  • Create a new script or from developer tools like this:
action: telegram_bot.send_message
data:
  config_entry_id: YOUR_CONFIG_ENTRY_ID
  target: YOUR_CHAT_ID
  keyboard:
    - 📜 Show list
    - 🛒 Active only
    - 📜 Show all
    - 🗑 Clear completed
    - 🔥 Clear al
  message: To‑do keyboard initialized

  • Replace YOUR_CONFIG_ENTRY_ID and YOUR_CHAT_ID with your values.
  • Run this script once; the reply keyboard will stay available in that chat.

How to use

  • Add items
    • Send a normal text message, e.g. milk, bread, eggs.
    • The blueprint splits by commas, trims spaces and adds each unique item to the selected todo list.
  • Show the list (active)
    • Use /list or tap 📜 Show list / 🛒 Active only.
    • You get a message titled “Your shopping list:” with one inline button per item (✅ name).
  • Toggle active ↔ all
    • In the inline message, use:
      • 📜 Show all to switch to “History (all items)”;
      • 🛒 Active only to return to active items only.
  • Mark item as done
    • Press ✅ item in the inline message.
    • The item is marked completed in the todo entity and disappears from the active view.
  • Clear completed items
    • Tap inline 🗑 Clear completed or reply‑keyboard 🗑 Clear completed.
    • All completed items are removed from the todo list.
  • Clear the entire list
    • Tap 🔥 Clear all in the reply keyboard.
    • Every item in the selected todo entity is removed.

The automation keeps editing the same inline message (tracked via the helper), so your list stays in one place in the chat instead of producing a long history of updates.

  1. Blueprints Exchange - Home Assistant Community
  2. 💬 Blueprint to create /commands in a Telegram Bot
  3. Creating an automation blueprint - Home Assistant
2 Likes

Update!

What changed

  • Completed items in the “:scroll: Show all / History (all items)” view now use a ☑️ button with an action that restores them to active status instead of doing nothing.
  • When you tap a completed item’s button, the blueprint updates that to‑do entry from completed back to needs_action, so it reappears in the active list view.
  • The callback‑handling logic was extended to recognize a new /reopen_<uid> action and respond with a short confirmation message (“Active again”) when an item is reactivated.
  • Also added condition to check bot config entry ID(for more then 2 bots integrations)

Update!

Description of changes

1. Multiple chat support

  • The telegram_chat_id input now uses a text selector with multiple: true, allowing you to specify more than one chat ID.
  • The automation checks whether the incoming chat_id is in the configured list and only then proceeds.
  • All replies (send, edit, delete) now use trigger.event.data.chat_id, so the bot always responds in the same chat where the message, command, or callback originated.

2. Bot instance filtering

  • A global condition compares trigger.event.data.bot.config_entry_id with the blueprint input bot_config_entry_id.
  • This ensures the automation only reacts to events from the specific Telegram bot instance selected in the blueprint, which is essential when multiple Telegram bots are configured.