Every 10 min in a window, weekdays
Get warned when your commute is running slow
On weekday mornings you get one email if your drive to work is 10 or more minutes slower than normal.
- Runs
- Every 10 min in a window, weekdays
- Apps
- Google Maps Platform
- AI
- Not needed
- Access
- API key with Routes API enabled
Send this to your assistant
Create a ClickRuntime automation: weekdays between 7:00 and 8:30, check every 10 minutes how long the drive from 14 Elm Road to 200 Market Street takes in current traffic, and email me once if it's 10+ minutes slower than usual.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A nurse who starts her shift at 7:30 normally needs 25 minutes to drive in, so she leaves at 6:50. On the mornings when an accident closes a lane on the ring road, the trip takes 55 minutes, she finds out only after she is already stuck, and she arrives late. Checking a maps app before every departure works, but it means remembering to do it on weekdays at six in the morning, when she is rushing.
On weekday mornings, within a window you set, ClickRuntime asks the Google Maps Routes API for a traffic-aware route and reads two numbers: the current duration with traffic, and staticDuration, the normal time without traffic. If the delay is large, you get one alert saying how long the drive takes now and how much slower that is.
It is useful for shift workers, school-run parents and anyone with a fixed arrival time.
What you get out of it
You hear before you leave the house
A warning that the drive is 30 minutes slower gives you the choice of leaving earlier, using a train or phoning ahead. Learning it at the first traffic jam leaves no choice at all.
Silence on normal days
You only get a message when the trip is much slower than usual, so on ordinary mornings nothing arrives. That makes the alert easy to trust and hard to tune out.
Fewer late arrivals
Leaving 20 minutes earlier on a bad day avoids the awkward message to a manager, the missed handover or the stress of watching the clock in traffic. The benefit is small each time and adds up over a year.
One alert per day
After warning you once, it stays quiet for that morning, even while the delay changes. You get the information when you need it without a stream of updates while you are getting ready.
Based on your actual route
The comparison uses your own home and work addresses, not city-wide traffic reports. A closure on a road you never use will not wake you, while a slow spot on your exact route will.
How it works
What happens, step by step
Every 10 minutes on weekday mornings, ClickRuntime asks Google Maps how long your drive to work takes in current traffic.
It compares that with how long the drive usually takes.
If today's drive is 10 or more minutes slower, you get an email with today's time and the usual time.
You only get one alert per day, so the rest of the morning's checks stay quiet.
Before it runs live
- Connect Google Maps Platform
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 Maps Platform steps into one automation
Under the hood
The code that runs this automation
from datetime import date
from clickruntime import on_trigger, credentials, http, state, notify
ORIGIN, DEST = "14 Elm Road", "200 Market Street"
@on_trigger
def run(event): # every 10 minutes, weekdays 7:00-8:30
if state.get("alerted_on") == date.today().isoformat():
return {"skipped": "already alerted today"}
resp = http.post("https://routes.googleapis.com/directions/v2:computeRoutes",
headers={"X-Goog-Api-Key": credentials.secret("GOOGLE_MAPS_API_KEY"),
"X-Goog-FieldMask": "routes.duration,routes.staticDuration"},
json={"origin": {"address": ORIGIN}, "destination": {"address": DEST},
"travelMode": "DRIVE", "routingPreference": "TRAFFIC_AWARE"})
route = resp.json()["routes"][0]
now, usual = int(route["duration"].rstrip("s")) // 60, int(route["staticDuration"].rstrip("s")) // 60
if now - usual >= 10:
notify.email_me(f"Traffic: commute is {now} min today", f"Usually {usual} min; {now - usual} min slower right now.")
state.set("alerted_on", date.today().isoformat())
return {"minutes": now, "usual": usual}FAQ
Common questions
What counts as much slower than usual?
Does it need a Google Maps API key?
Can it check the drive home as well?
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
Find out when to leave to arrive on time
Each weekday morning you get the latest time to set off and still reach the office by 9:00.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksPost a morning briefing to Slack
Your team starts the day with the weather, a reminder or anything else you'd like in #general.
See how it worksKeep exploring
Set up “Get warned when your commute is running slow” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.