Skip to content

Weekly

Track your X post performance weekly

Every week your posts' views, likes and reposts are saved to a sheet, and you get an email with the highlights.

Runs
Weekly
Apps
Google Sheets, X
AI
Optional
Access
X tweet.read, users.read; Sheets edit

Send this to your assistant

Create a ClickRuntime automation: every Monday at 9am, get last week's posts from my X account with their views, likes, replies and reposts, add them to my X Stats sheet, and email me a short summary of what worked.

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

Anyone posting regularly on X wants to know what is working, but X's own analytics only show recent activity and are hard to compare week to week. Copying numbers into a spreadsheet by hand is tedious, so most people never build the history that would show them what their audience responds to.

Saving every post's numbers each week builds that history automatically. The summary email points out what stood out, so you can do more of it next week.

What you get out of it

  • A history you own

    Metrics for every post build up in your own sheet, so you can compare months and spot trends that X's dashboard does not keep.

  • Lessons, not just numbers

    The weekly email highlights the best and worst posts and what they had in common, so you know what to try next.

  • Easy reporting

    The sheet is ready for charts or for sharing with a client or manager without any copying.

  • No manual data entry

    Numbers are collected the same way every week, which keeps the record complete and comparable.

How it works

What happens, step by step

  1. Every Monday ClickRuntime collects last week's posts from your X account with their views, likes, replies and reposts.

  2. Each post is added as a row in your stats sheet.

  3. AI looks at the numbers and writes a short summary of what performed best and why.

  4. The summary is emailed to you.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect X

What you get

RunsWeekly
Track your X post performance weeklytoday, 9:00Succeeded
Email · Your week on X• Best post: the Northwind case study thread, 4.2k views and 61 likes • Posts with a screenshot got twice the views of text-only posts

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 Sheets and X 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_x_performance_report_in_a_sheet.pyexample
from datetime import datetime, timedelta, timezone
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, notify

SHEET_ID = "your-spreadsheet-id"

@on_trigger
def run(event):
    x = {"Authorization": "Bearer " + credentials.connection("x", "main")}
    me = http.get("https://api.x.com/2/users/me", headers=x).json()["data"]["id"]
    since = (datetime.now(timezone.utc) - timedelta(days=7)).strftime("%Y-%m-%dT%H:%M:%SZ")
    posts = http.get(f"https://api.x.com/2/users/{me}/tweets", headers=x, params={
        "start_time": since, "max_results": 100, "tweet.fields": "public_metrics,created_at"}).json().get("data", [])
    rows = [[p["created_at"][:10], p["text"][:120], p["public_metrics"].get("impression_count", 0), p["public_metrics"]["like_count"],
             p["public_metrics"]["reply_count"], p["public_metrics"]["retweet_count"]] for p in posts]
    if not rows:
        return {"posts": 0}
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    sheets.spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Stats!A:F", valueInputOption="RAW", body={"values": rows}).execute()
    try:
        summary = ai.generate("date | text | views | likes | replies | reposts\n" + "\n".join(" | ".join(map(str, r)) for r in rows),
                              system="In 4 bullet points, say which posts did best and what they had in common.", max_output_tokens=300).text
    except (ai.AINotIncluded, ai.AILimitReached):
        summary = "Top post: " + max(rows, key=lambda r: r[3])[1]
    notify.email_me(f"Your week on X: {len(rows)} posts", summary)
    return {"posts": len(rows)}

FAQ

Common questions

Which numbers are saved?
Views, likes, replies, reposts and quotes for each post, with the date and text.
Does it need a paid X plan?
Reading post metrics needs a paid API access level from X. Posting alone works on the free level.
Can it track a client's account?
Yes, if the client connects their X account. Each account can write to its own tab or sheet.
What permissions does it need?
X tweet.read, users.read; Sheets edit. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it runs (weekly). 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 “Track your X post performance weekly” from your assistant

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