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.
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
Every Monday ClickRuntime collects last week's posts from your X account with their views, likes, replies and reposts.
Each post is added as a row in your stats sheet.
AI looks at the numbers and writes a short summary of what performed best and why.
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
Build your own
Need it to work differently?
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
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?
Does it need a paid X plan?
Can it track a client's account?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Post to X from a spreadsheet queue
Write posts in a sheet whenever you like, and they go out on X one at a time, every few hours.
See how it worksPublish your sheet content plan to X
Posts planned in your Google Sheet are written up by AI and published on X on the day you scheduled them.
See how it worksPost a daily themed update on X
Each day a post about today's occasion, local weather or top news goes out on X, with a history kept in your sheet.
See how it worksKeep exploring
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.