Skip to content

On a schedule

Get a weekly website report in Telegram

Every Monday a Telegram message compares last week's traffic, sources and top pages with the week before, with a short explanation.

Runs
On a schedule
Apps
Google Analytics, Telegram
AI
Yes, uses the built-in AI allowance
Access
GA4 Viewer for service account; bot token

Send this to your assistant

Create a ClickRuntime automation: every Monday at 8am, compare last week's GA4 users, sessions, top sources and top pages with the week before, write a short summary with AI and send it to my Telegram, with a copy by email.

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 founder running a small online business checks their phone first thing on Monday. They want to know how the website did last week, but GA4 on a phone is hard work and they rarely bother.

A short report in Telegram, written in plain words, gives them the week in a few seconds, wherever they are.

What you get out of it

  • The week in a few lines

    Visitors, sources and top pages, with the change from the week before, in one message.

  • Read it on your phone

    Telegram is quick to check; GA4 on a phone is not.

  • Explained, not just listed

    AI says what moved and why it might have, so the numbers mean something.

  • A copy for your records

    The same report is emailed to you, so you have a searchable archive.

How it works

What happens, step by step

  1. Every Monday morning, ClickRuntime asks Google Analytics for last week's and the previous week's numbers.

  2. It works out the change in users and sessions and lists the top sources and pages.

  3. AI writes a short summary of what moved.

  4. The report is sent to your Telegram chat, with a copy to your email.

Before it runs live

  • Connect Google Analytics
  • Connect Telegram

What you get

RunsOn a schedule
Get a weekly website report in Telegramtoday, 9:00Succeeded
Telegram · Weekly report📊 Last week: 3,940 users (+9%), 5,210 sessions (+7%). Biggest gain: newsletter (+64%) after the Acme case study. /blog/acme-case-study is now your #2 page.

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
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Google Analytics and Telegram 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.
weekly_ai_analytics_report_sent_to_telegram.pyexample
from clickruntime import on_trigger, http, credentials, ai, notify

CHAT_ID = "123456789"

def tg(method, **params):
    r = http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params)
    return r.raise_for_status() or r.json()["result"]

PROPERTY = "123456789"

def ga(body):
    url = f"https://analyticsdata.googleapis.com/v1beta/properties/{PROPERTY}:runReport"
    return http.post(url, headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"}, json=body).json().get("rows", [])

WEEKS = [{"startDate": "7daysAgo", "endDate": "yesterday"}, {"startDate": "14daysAgo", "endDate": "8daysAgo"}]

def top(dim):
    rows = ga({"dateRanges": WEEKS, "dimensions": [{"name": dim}], "metrics": [{"name": "sessions"}],
               "orderBys": [{"metric": {"metricName": "sessions"}, "desc": True}], "limit": 10})
    return "\n".join(f"{r['dimensionValues'][0]['value']} [{r['dimensionValues'][1]['value']}]: {r['metricValues'][0]['value']}" for r in rows)

@on_trigger
def run(event):
    totals = ga({"dateRanges": WEEKS, "metrics": [{"name": "totalUsers"}, {"name": "sessions"}]})
    data = "Totals (users, sessions):\n" + "\n".join(", ".join(v["value"] for v in r["metricValues"]) for r in totals)
    data += f"\n\nSources:\n{top('sessionSource')}\n\nPages:\n{top('pagePath')}"
    report = ai.generate(data, system="date_range_0 is last week, date_range_1 the week before. Write a 8-line Telegram report: "
                         "totals with % change, top movers among sources and pages, one suggestion.", max_output_tokens=400).text
    tg("sendMessage", chat_id=CHAT_ID, text=report)
    notify.email_me("Website last week", report)
    return {"sent": True}

FAQ

Common questions

How long is the message?
About ten lines: a short summary followed by the key numbers.
Can I add conversions or revenue?
Yes. Name the events or revenue metric you care about in the prompt.
What day and time does it arrive?
Monday at 8am by default. You can choose any day, time and timezone.
What permissions does it need?
GA4 Viewer for service account; bot token. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). 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 “Get a weekly website report in Telegram” from your assistant

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