Setting up daily task reminders from Notion: Automation advice needed

Hi everyone! I’m working on automating my daily task reminders from Notion. The goal is to get a list of tasks due today sent to me automatically. I tried using Zapier with WhatsApp but it was too expensive. Now I’m considering a Telegram chatbot instead.

I’m having trouble with the date formatting between Notion and Zapier. The filter isn’t working as expected. I’ve attempted to use Zapier’s Formatter tool to fix this but no success so far.

Has anyone successfully set up a similar automation? Any tips or tricks you can share?

Here’s a simple code example of what I’m trying to achieve:

import notion
import telegram

def get_todays_tasks():
    tasks = notion.get_tasks(due_date=today)
    return tasks

def send_to_telegram(tasks):
    bot = telegram.Bot(token='your_bot_token')
    message = "Today's tasks:\n" + '\n'.join(tasks)
    bot.send_message(chat_id='your_chat_id', text=message)

daily_tasks = get_todays_tasks()
send_to_telegram(daily_tasks)

I’d love to hear your thoughts or experiences with similar projects. Thanks in advance for any help!

Have you considered using the Notion API directly? It’s a bit more technical, but it gives you full control over the data and formatting. You’d need to set up a simple server (maybe using Flask or FastAPI) that queries the Notion API daily, formats the tasks, and sends them to Telegram.

For date handling, the Notion API returns ISO 8601 format. You can use the ‘datetime’ library in Python to parse and format these dates easily. Something like:

from datetime import datetime, date
notion_date = '2023-05-15T00:00:00.000Z'
task_date = datetime.fromisoformat(notion_date.replace('Z', '+00:00')).date()
if task_date == date.today():
    # add task to today's list

This approach might take more initial setup, but it’s more flexible and cost-effective in the long run. Plus, you’ll learn a lot in the process!

hey markseeker91, i’ve done smth similar using make.com (integromat). it’s way cheaper than zapier and handles date formatting better. for notion dates, use a ‘date/time’ format step in make to convert ISO to your local timezone. then use telegram’s sendMessage API. works like a charm! lmk if u need more help

I’ve actually been down this road before and can share some insights. Instead of relying on third-party services, I ended up writing a custom Python script that directly interfaces with both the Notion API and Telegram Bot API. It was a bit of a learning curve, but totally worth it.

For the Notion part, I used the official Python SDK. It handles the authentication and API calls seamlessly. The trickiest part was dealing with the date filtering, but I solved it by converting Notion’s ISO 8601 dates to Python datetime objects for comparison.

On the Telegram side, the python-telegram-bot library made things super easy. I set up a simple bot that sends me a message every morning with my tasks for the day.

I run this script on a Raspberry Pi I had lying around, but any always-on computer or a cloud service would work. It’s been running flawlessly for months now, and I’ve even added some extra features like marking tasks as complete directly from Telegram.

If you’re comfortable with Python, I’d highly recommend this approach. It’s flexible, cost-effective, and you have full control over your data. Let me know if you want more details!