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.
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
Every night, ClickRuntime looks up tomorrow's prayer times for your city.
It adds a busy block to your Google Calendar for each prayer time.
It sends you tomorrow's schedule as a Telegram message.
Before it runs live
- Connect Google Calendar
- Connect Telegram
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
- 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
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?
How long is each block?
Can I use it for other recurring windows?
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
Get a Telegram warning about tomorrow's calendar clashes
Each evening at 19:00, ClickRuntime checks tomorrow on your Google Calendars and sends a Telegram warning if any events overlap or run back to back.
See how it worksGet a Telegram reminder before each meeting
A few minutes before each meeting you get a Telegram message with the time, the join link and a short prep note.
See how it worksGet today's calendar on Telegram every morning
Every weekday at 7am you get a tidy list of today's meetings and events in Telegram.
See how it worksKeep exploring
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.