Skip to content

Daily

Block focus time on busy days

On days full of meetings, a focus block is added to your first free gap.

Runs
Daily
Apps
Google Calendar
AI
Not needed
Access
read+write

Send this to your assistant

Create a ClickRuntime automation: every evening at 8pm, if tomorrow has more than 4 hours of meetings, add a 2-hour Focus block marked busy in the first free gap.

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 product manager's Tuesday looks fine on Monday night, then fills with six meetings by morning. The week's real work, specs and reviews, gets squeezed to the edges or pushed to evenings. Nobody schedules over blocked time, but she never remembers to block it until the day is already full, and by then every open slot has an invitation sitting on it.

Each day, ClickRuntime looks at tomorrow's Google Calendar events and adds up the meeting time. If the day is heavy, it finds a free gap and creates a busy focus event, so that colleagues and booking tools see you as unavailable. Lighter days are left untouched. Nothing changes on days that are not overloaded.

Engineers and writers who need long unbroken stretches use it to protect them before the invitations arrive.

What you get out of it

  • Deep work gets a protected slot

    A busy event on the calendar stops other people from booking over it. Hours for writing and thinking survive on exactly the days when they would otherwise disappear. Specs, reviews and planning get done during working hours rather than at the weekend.

  • Heavy days get relief automatically

    The automation only acts when meeting time passes your limit. Light days stay open for spontaneous conversations, so you are not hiding on days when you have capacity. Flexible days stay flexible.

  • Fewer evenings spent catching up

    When work is squeezed to the edges, it spills into nights. Reserving a block during the day keeps more tasks inside working hours, which supports better sleep and sustainable pace. The saved evenings are the real payoff.

  • Colleagues see your availability honestly

    Booking tools and teammates respect the busy block, which sets a clear boundary without a conversation. People simply pick another time, with no friction or awkwardness. Nobody has to decline anything or explain.

  • Consistent habit, no willpower needed

    Blocking time works only when you do it every day. Automating it removes the dependence on remembering, which is why the habit actually survives busy weeks. Most people give up on manual blocking within a month, so removing the manual step is what makes the benefit last.

How it works

What happens, step by step

  1. Every day ClickRuntime looks at tomorrow's events in your Google Calendar between 9am and 6pm.

  2. It adds up how much of the day is already taken by meetings.

  3. On a busy day it finds the longest free gap.

  4. It books that gap as a Focus event marked busy, so nobody can schedule over it.

Before it runs live

  • Connect Google Calendar

What you get

RunsDaily
Block focus time on busy daystoday, 9:00Succeeded
Google Calendar · primaryFocus, Wed 22 Oct 13:00–15:00 (busy)

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 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_focus_time_on_busy_days.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timedelta, time
from zoneinfo import ZoneInfo
from clickruntime import on_trigger, credentials

TZ = ZoneInfo("America/New_York")

@on_trigger
def run(event):
    cal = build("calendar", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    day = datetime.now(TZ).date() + timedelta(days=1)
    start, end = datetime.combine(day, time(9), TZ), datetime.combine(day, time(18), TZ)
    items = [e for e in cal.events().list(calendarId="primary", timeMin=start.isoformat(), timeMax=end.isoformat(),
                                          singleEvents=True, orderBy="startTime").execute()["items"] if "dateTime" in e["start"]]
    spans = [(datetime.fromisoformat(e["start"]["dateTime"]), datetime.fromisoformat(e["end"]["dateTime"])) for e in items]
    if sum((b - a).total_seconds() for a, b in spans) <= 4 * 3600:
        return {"blocked": False}
    cursor = start
    for a, b in spans + [(end, end)]:
        if a - cursor >= timedelta(hours=2):
            cal.events().insert(calendarId="primary", body={
                "summary": "Focus", "transparency": "opaque",
                "start": {"dateTime": cursor.isoformat()}, "end": {"dateTime": (cursor + timedelta(hours=2)).isoformat()},
            }).execute()
            return {"blocked": True, "at": cursor.isoformat()}
        cursor = max(cursor, b)
    return {"blocked": False, "reason": "no 2-hour gap"}

FAQ

Common questions

How much meeting time makes a day count as busy?
You choose the number of hours, such as four hours of meetings or more. The automation adds up the duration of the next day's events and compares it with that limit. All-day events and declined invitations are normally left out of the total.
How does it pick the free gap for the focus block?
It looks for the longest open stretch inside your working hours, or the first gap of at least the length you want, such as 90 minutes. If there is no suitable gap, it does nothing rather than squeezing a block into an impossible schedule.
Will the focus event be visible to my colleagues?
It appears as a busy event, and you can name it something neutral like Focus time. Colleagues with access to your calendar see it as busy, and booking pages treat the time as unavailable. You can set it private if you prefer.
What permissions does it need?
read+write. 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 focus time on busy days” from your assistant

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