The moment it happens
Add, list and complete Notion tasks from Telegram
Message your bot in plain words and it creates, lists or completes tasks in your Notion database.
- Runs
- The moment it happens
- Apps
- Notion, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- bot token; Notion read+write
Send this to your assistant
Create a ClickRuntime automation: when I message my Telegram bot, turn it into a Notion task with title, due date and priority, or list or complete tasks if that's what I ask.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A busy freelancer keeps their tasks in Notion but thinks of them while away from the desk: driving, in a client meeting, at the shop. Opening Notion on a phone and filling in a task's properties is slow enough that tasks end up in a notes app or forgotten.
Messaging a bot in plain words is as fast as texting a friend. The task arrives in Notion with a due date and priority already set, and you can ask what is due today or mark something done without opening Notion at all.
What you get out of it
Capture tasks in seconds
"Send Contoso the invoice Friday, high priority" becomes a properly filled task. Quick capture is what keeps a task list complete.
One list, not three
Tasks noted on the go end up in the same Notion database as everything else. You stop reconciling notes apps, emails to yourself and Notion.
Check what is due from anywhere
Ask "what's due today?" and get a short list back. That is handy before a call or on the way to the office.
Close tasks as you finish them
Tell the bot "done with the Northwind report" and the task is marked complete. Your list stays accurate without a separate tidy-up session.
How it works
What happens, step by step
You send your Telegram bot a message, such as "call the printer tomorrow, high priority" or "what's due today?".
AI works out whether you want to add, list or complete a task, and picks out the title, due date and priority.
ClickRuntime creates, finds or updates the task in your Notion database.
The bot replies with what it did, such as the new task or today's list.
Before it runs live
- Connect Notion and share the database you want it to use
- Connect Telegram
- Paste your automation's link into the other app's webhook settings
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
- Act only on the items that match your own rules, and skip the rest
- 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 Notion and Telegram steps into one automation
Under the hood
The code that runs this automation
from datetime import date
from clickruntime import on_event, credentials, http, ai
DB, ALLOWED_CHAT = "your-database-id", 123456789
SCHEMA = {"type": "object", "properties": {"action": {"enum": ["add", "list", "done"]}, "title": {"type": "string"},
"due": {"type": "string"}, "priority": {"enum": ["High", "Medium", "Low"]}}, "required": ["action"]}
@on_event
def handle(event):
msg = (event.json or {}).get("message") or {}
if msg.get("chat", {}).get("id") != ALLOWED_CHAT or not msg.get("text"):
return {"skipped": True}
nh = {"Authorization": f"Bearer {credentials.connection('notion', 'work')}", "Notion-Version": "2022-06-28"}
intent = ai.generate(f"Today is {date.today()}. Parse this task request (due as YYYY-MM-DD): {msg['text']}", json_schema=SCHEMA, max_output_tokens=120).json
if intent["action"] == "add":
props = {"Name": {"title": [{"text": {"content": intent.get("title", msg["text"])}}]}, "Priority": {"select": {"name": intent.get("priority", "Medium")}}}
if intent.get("due"):
props["Due"] = {"date": {"start": intent["due"]}}
http.post("https://api.notion.com/v1/pages", headers=nh, json={"parent": {"database_id": DB}, "properties": props})
reply = f"Added: {intent.get('title')}"
else:
open_tasks = http.post(f"https://api.notion.com/v1/databases/{DB}/query", headers=nh,
json={"filter": {"property": "Done", "checkbox": {"equals": False}}}).json()["results"]
names = {t["id"]: t["properties"]["Name"]["title"][0]["plain_text"] for t in open_tasks if t["properties"]["Name"]["title"]}
if intent["action"] == "list":
reply = "\n".join(f"- {n}" for n in names.values()) or "Nothing open."
else:
match = next((i for i, n in names.items() if intent.get("title", "").lower() in n.lower()), None)
if match:
http.patch(f"https://api.notion.com/v1/pages/{match}", headers=nh, json={"properties": {"Done": {"checkbox": True}}})
reply = f"Done: {names[match]}" if match else "Couldn't find that task."
http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage", json={"chat_id": ALLOWED_CHAT, "text": reply})
return {"action": intent["action"]}FAQ
Common questions
What does my Notion database need?
How does it understand dates like "next Tuesday"?
Can other people send tasks to my bot?
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
Save Telegram messages and voice notes to Notion
Anything you send your Telegram bot, from a quick note to a voice memo or a link, becomes a summarised page in your Notion Inbox.
See how it worksLog receipts sent to Telegram in a Notion expenses database
Send a photo of a receipt or invoice to your Telegram bot and it is logged in your Notion expenses database, with a spending summary every Sunday.
See how it worksSave relevant RSS articles to Notion with Telegram alerts
Articles from your feeds that match your topics are saved to Notion with a summary, and the best ones are sent to you on Telegram.
See how it worksKeep exploring
Set up “Add, list and complete Notion tasks from Telegram” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.