Skip to content

Daily

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.

Runs
Daily
Apps
Google Maps Platform
AI
Not needed
Access
API key

Send this to your assistant

Create a ClickRuntime automation: every weekday at 7:30, work out from current traffic what time I need to leave 14 Elm Road to reach 200 Market Street by 9:00, and email me that time.

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 freelance photographer has a client shoot at 9:00 across town. She knows the drive usually takes about 35 minutes, so she plans to leave at 8:15. On the day of a marathon or a rainstorm the trip takes 70 minutes and she is late, with equipment in the car and a client waiting. A calendar reminder set for a fixed time cannot account for traffic, because it was created days ago.

Each day, ClickRuntime asks Google Maps for a route to the destination with an arrival estimate, adds a buffer of your choosing, and works out the time you need to leave to get there by 9:00. It then sends you a notification with that leave-by time, so the reminder reflects the conditions on that day.

It helps people with fixed appointments, such as school drop-offs, early flights, or recurring client sites.

What you get out of it

  • A leave-by time based on real traffic

    A reminder calculated from the day's conditions replaces a guess made last week. When a road is blocked you are told to leave earlier, and when it is clear you can enjoy another coffee.

  • Punctuality with clients

    Arriving on time for the first meeting sets the tone for a project. Photographers, tradespeople and consultants rarely get a second chance to make a first impression. Arriving early also leaves time to set up properly.

  • No mental arithmetic in the morning

    Working out the departure time from an estimate and a buffer is easy to get wrong when tired. Receiving the finished time takes one decision off a busy start to the day.

  • Less stress while traveling

    Leaving with enough margin means you do not drive anxiously or rush through a door. The calm benefit is real and becomes visible after a few weeks of consistently arriving early.

  • Reusable for any fixed appointment

    The same pattern works for a flight, a school run or a weekly class. Change the destination and the arrival time, and every recurring commitment gets its own accurate reminder.

How it works

What happens, step by step

  1. Every weekday at 7:30, ClickRuntime asks Google Maps how long your drive to the office takes in current traffic.

  2. It works back from your 9:00 arrival time to find the latest time you can leave.

  3. You get an email such as "Leave by 08:23" with the expected drive time.

Before it runs live

  • Connect Google Maps Platform

What you get

RunsDaily
Find out when to leave to arrive on timetoday, 9:00Succeeded
Email · Leave byLeave by 08:23 The drive takes about 32 min in current traffic to arrive by 9:00.

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 Maps Platform 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.
leave_by_reminder_for_a_calendar_free_trip.pyexample
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
from clickruntime import on_trigger, credentials, http, notify

ORIGIN, DEST = "14 Elm Road", "200 Market Street"
TZ = ZoneInfo("America/New_York")

@on_trigger
def run(event):  # weekdays 7:30
    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"},
                     json={"origin": {"address": ORIGIN}, "destination": {"address": DEST},
                           "travelMode": "DRIVE", "routingPreference": "TRAFFIC_AWARE"})
    minutes = int(resp.json()["routes"][0]["duration"].rstrip("s")) // 60
    arrive = datetime.now(TZ).replace(hour=9, minute=0, second=0, microsecond=0)
    leave = arrive - timedelta(minutes=minutes + 5)  # 5 minute buffer
    notify.email_me(f"Leave by {leave:%H:%M}", f"The drive takes about {minutes} min in current traffic to arrive by 9:00.")
    return {"leave_by": leave.strftime("%H:%M"), "minutes": minutes}

FAQ

Common questions

How is the leave-by time worked out?
It takes the arrival time you want, subtracts the estimated travel time from Google Maps and then subtracts a buffer you choose, such as 10 minutes for parking. The result is the time you should be walking out of the door.
Can it handle a different destination each day?
It can read the destination and arrival time from a source such as a spreadsheet row, so each day's trip is calculated separately. For a single repeated trip, a fixed address is the simplest setup and needs no extra data.
Does it work with public transit or walking?
The Routes API supports driving, walking, cycling and transit modes, with transit availability depending on the area. Tell your AI assistant the mode you use, and the estimate will be requested for that mode instead of driving.
What permissions does it need?
API key. 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 “Find out when to leave to arrive on time” from your assistant

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