Skip to content

Hourly or daily

Sync an outside calendar feed into Google Calendar

Events from a feed or another tool appear in your calendar and stay up to date as they change or get cancelled.

Runs
Hourly or daily
Apps
Google Calendar
AI
Not needed
Access
read+write (calendar.events)

Send this to your assistant

Create a ClickRuntime automation: every morning at 6am, read this ICS feed and copy its events into my Imports calendar: add new ones, update changed ones and remove cancelled ones.

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 community center publishes classes on its own website, a sports league keeps fixtures in a spreadsheet, and a conference lists sessions in an ICS feed. A parent who wants these in Google Calendar subscribes to some, copies others by hand, and never notices when a match is moved or a class is cancelled. The calendar shows the original time, and someone turns up at the wrong hour.

Hourly or daily, ClickRuntime fetches the source, whether an ICS feed, an API or a web page, and turns each item into a calendar event with a stable ID. New items are inserted, changed items updated and removed items deleted, so your Google Calendar keeps matching the source.

Event organizers and clubs use it to give members a calendar that always shows the latest schedule.

What you get out of it

  • The calendar stays current

    When a fixture moves, your event moves with it. People stop turning up at the wrong time because the calendar showed an outdated entry. Parents, volunteers and members all rely on it being right.

  • Works with sources that have no feed

    Pages and APIs that do not offer a calendar subscription can still be imported. That includes club websites and booking systems that only display a list of upcoming dates. That covers club sites and booking systems.

  • Cancellations actually disappear

    Removed items are deleted from your calendar, not left to confuse you. Anyone relying on the calendar sees the real schedule, which is critical for parents and volunteers. That matters most for volunteers and parents who plan around the calendar.

  • No duplicates after updates

    Each event has a stable ID, so a changed time updates the existing entry. You never end up with two copies of the same class with different hours. One event, one entry, always.

  • One calendar for many sources

    Classes, fixtures and sessions from different places end up in one view. Planning a week no longer involves checking four websites and a spreadsheet. Nothing else needs to be consulted when planning the week, and you stop discovering conflicts after the fact.

How it works

What happens, step by step

  1. Every hour or every day ClickRuntime downloads the outside calendar feed you subscribed to.

  2. It matches each event in the feed with the copy it made last time in your Google Calendar.

  3. New events are added, changed ones are updated and cancelled ones are removed.

  4. Your Google Calendar stays in step with the outside feed, without duplicates.

Before it runs live

  • Connect Google Calendar

What you get

RunsHourly or daily
Sync an outside calendar feed into Google Calendartoday, 9:00Succeeded
Google Calendar · ImportsAdded 3, updated 1, removed 1 New: Northwind Meetup, Thu 23 Oct 18:30 at Acme Hall

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.
import_an_outside_event_source_into_the_calendar.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http

ICS_URL = "https://example.com/events.ics"
CALENDAR_ID = "imports-calendar-id@group.calendar.google.com"

def parse_ics(text):
    text = text.replace("\r\n ", "").replace("\n ", "")
    for block in text.split("BEGIN:VEVENT")[1:]:
        fields = dict(l.split(":", 1) for l in block.split("END:VEVENT")[0].splitlines() if ":" in l)
        yield {k.split(";")[0]: v for k, v in fields.items()}

def when(v):
    if "T" not in v:
        return {"date": f"{v[:4]}-{v[4:6]}-{v[6:8]}"}
    return {"dateTime": f"{v[:4]}-{v[4:6]}-{v[6:8]}T{v[9:11]}:{v[11:13]}:{v[13:15]}" + ("Z" if v.endswith("Z") else ""),
            "timeZone": "UTC"}

@on_trigger
def run(event):
    cal = build("calendar", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    feed = {e["UID"]: e for e in parse_ics(http.get(ICS_URL).text)}
    existing = {e["extendedProperties"]["private"]["uid"]: e for e in cal.events().list(
        calendarId=CALENDAR_ID, privateExtendedProperty="source=ics", maxResults=2500).execute()["items"]}
    added = updated = removed = 0
    for uid, e in feed.items():
        body = {"summary": e.get("SUMMARY", ""), "location": e.get("LOCATION", ""),
                "start": when(e["DTSTART"]), "end": when(e.get("DTEND", e["DTSTART"])),
                "extendedProperties": {"private": {"source": "ics", "uid": uid}}}
        if uid not in existing:
            cal.events().insert(calendarId=CALENDAR_ID, body=body).execute(); added += 1
        elif existing[uid]["summary"] != body["summary"] or existing[uid]["start"] != body["start"]:
            cal.events().patch(calendarId=CALENDAR_ID, eventId=existing[uid]["id"], body=body).execute(); updated += 1
    for uid in existing.keys() - feed.keys():
        cal.events().delete(calendarId=CALENDAR_ID, eventId=existing[uid]["id"]).execute(); removed += 1
    return {"added": added, "updated": updated, "removed": removed}

FAQ

Common questions

How often does the calendar refresh?
You pick hourly or daily. Hourly suits schedules that change often, like sports fixtures near match day, while daily is enough for slower sources such as monthly classes. Fewer refreshes mean fewer requests to the source site.
What if the source does not give each event a unique ID?
A stable ID can be built from fields like the title, date and location. If an organizer changes the title, the system may treat it as a new event, so a field that rarely changes is the best choice for the ID.
Can I import into a separate calendar so it does not clutter mine?
Yes, and it is a good idea. Create a dedicated calendar for the imported source, which you can show, hide or share separately. Deleting that calendar later also removes every imported event in one step.
What permissions does it need?
read+write (calendar.events). 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 (hourly or 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 “Sync an outside calendar feed into Google Calendar” from your assistant

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