Skip to content

Daily

Block tomorrow's prayer times in your calendar and get them on Telegram

Each night, tomorrow's prayer times are blocked as busy in your Google Calendar and the schedule is sent to you on Telegram.

Runs
Daily
Apps
Google Calendar, Telegram
AI
Not needed
Access
calendar read+write; bot token

Send this to your assistant

Create a ClickRuntime automation: every night, add busy blocks to my Google Calendar for tomorrow's prayer times and send me the schedule on Telegram.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A consultant prays five times a day, and the times shift a little every day through the year. Colleagues book meetings straight over them because her calendar shows her as free, and she ends up declining and rescheduling calls.

Blocking each prayer time as busy the night before keeps those windows protected in shared calendars. A Telegram message with the times means she has the schedule on her phone without opening any app.

What you get out of it

  • Protected time others can see

    Busy blocks show up when colleagues and clients look for a slot. Meetings stop landing on top of prayer.

  • Always the right times

    Times are fetched fresh for your city each night, so seasonal shifts are handled without any edits.

  • The schedule in your pocket

    The Telegram message gives you the day's times at a glance, even when you are away from your desk.

  • Fewer awkward reschedules

    Declining meetings after they are booked is harder than never having them booked. Blocks prevent the conflict.

How it works

What happens, step by step

  1. Every night, ClickRuntime looks up tomorrow's prayer times for your city.

  2. It adds a busy block to your Google Calendar for each prayer time.

  3. It sends you tomorrow's schedule as a Telegram message.

Before it runs live

  • Connect Google Calendar
  • Connect Telegram

What you get

RunsDaily
Block tomorrow's prayer times in your calendar and get them on Telegramtoday, 9:00Succeeded
Telegram · TomorrowTomorrow (Mon 20 Oct): Fajr 05:41, Dhuhr 12:51, Asr 15:38, Maghrib 18:01, Isha 19:25

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Calendar and Telegram steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
auto_block_recurring_time_windows_and_notify.pyexample
from datetime import datetime, timedelta
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http

CITY, COUNTRY, TZ, CHAT_ID = "London", "UK", "Europe/London", "your-telegram-chat-id"

@on_trigger
def run(event):
    day = datetime.now() + timedelta(days=1)
    data = http.get(f"https://api.aladhan.com/v1/timingsByCity/{day:%d-%m-%Y}",
                    params={"city": CITY, "country": COUNTRY}).json()["data"]["timings"]
    prayers = ["Fajr", "Dhuhr", "Asr", "Maghrib", "Isha"]
    cal = build("calendar", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    for p in prayers:
        start = datetime.strptime(f"{day:%Y-%m-%d} {data[p][:5]}", "%Y-%m-%d %H:%M")
        cal.events().insert(calendarId="primary", body={"summary": p, "transparency": "opaque",
            "start": {"dateTime": start.isoformat(), "timeZone": TZ},
            "end": {"dateTime": (start + timedelta(minutes=15)).isoformat(), "timeZone": TZ}}).execute()
    text = f"Tomorrow ({day:%a %d %b}):\n" + "\n".join(f"{p} {data[p][:5]}" for p in prayers)
    http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage",
              json={"chat_id": CHAT_ID, "text": text})
    return {"blocked": len(prayers)}

FAQ

Common questions

Which calculation method does it use?
You choose your city and the calculation method used by your community when setting it up, and those settings are used every night.
How long is each block?
Fifteen minutes by default. You can make each block longer, for example to include travel to a mosque on Fridays.
Can I use it for other recurring windows?
Yes. The same pattern works for any windows that change day to day, such as school runs that follow a timetable.
What permissions does it need?
calendar read+write; bot token. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Block tomorrow's prayer times in your calendar and get them on Telegram” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.