The moment it happens
Weekly email of new members in a Telegram group
Your bot records who joins and leaves your Telegram group, and every Monday you get an email listing them with the week's net change.
- Runs
- The moment it happens
- Apps
- Telegram
- AI
- Not needed
- Access
- bot token (bot must be group admin to receive chat_member updates)
Send this to your assistant
Create a ClickRuntime automation: track who joins and leaves my Telegram community group, and every Monday at 8:00 email me a list of joins and leaves with names and usernames, the net change and the current member count.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Community owners want to know whether their group is growing and who is new, so they can welcome people or notice when a post drove people away. Telegram shows the current count but not who came and went this week.
This automation listens for member changes through your bot and keeps a weekly log. Every Monday you get one email with the names of people who joined and left, the net change and the current total.
It suits community managers, course creators and small brands that run a Telegram group as part of their business.
What you get out of it
Growth you can see
A weekly net change shows the trend without exporting anything.
Names, not just numbers
Knowing who joined lets you welcome new members or spot a returning customer.
Notice drop-offs
A spike in leavers after a post or announcement is easy to see in the list.
Lands in your inbox
A Monday email is easy to file or forward to a partner who is not in the group.
No extra bots in the group
Your own bot does the work with a single admin permission.
How it works
What happens, step by step
You make your bot an admin of the group so Telegram tells it about member changes.
Each time someone joins or leaves, ClickRuntime records their name, username and the time.
Every Monday at 8:00 it emails you the week's joins and leaves, the net change and the current member count.
The list then starts fresh for the new week.
Before it runs live
- Connect Telegram
- Paste your automation's link into the other app's webhook settings
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
- Act only on the items that match your own rules, and skip the rest
- 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 Telegram steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, state, notify
GROUP = -1001234567890
def tg(method, **params):
r = http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params)
r.raise_for_status()
return r.json()["result"]
def who(u):
name = " ".join(filter(None, [u.get("first_name"), u.get("last_name")]))
return f"{name} (@{u['username']})" if u.get("username") else name
@on_trigger
def run(event):
log = state.get("log") or {"joined": [], "left": []}
cm = (event.get("json") or {}).get("chat_member")
if cm: # webhook update
if cm["chat"]["id"] != GROUP:
return {"skipped": True}
old, new = cm["old_chat_member"]["status"], cm["new_chat_member"]["status"]
member = ("member", "administrator", "creator", "restricted")
if old not in member and new in member:
log["joined"].append(who(cm["new_chat_member"]["user"]))
elif old in member and new not in member:
log["left"].append(who(cm["new_chat_member"]["user"]))
state.set("log", log)
return {"recorded": True}
count = tg("getChatMemberCount", chat_id=GROUP) # weekly report
net = len(log["joined"]) - len(log["left"])
body = (f"Joined ({len(log['joined'])}): " + (", ".join(log["joined"]) or "none") +
f"\n\nLeft ({len(log['left'])}): " + (", ".join(log["left"]) or "none") +
f"\n\nNet change: {net:+d} · Members now: {count:,}")
notify.email_me(subject=f"Telegram group: {net:+d} this week", body=body)
state.set("log", {"joined": [], "left": []})
return {"net": net}
FAQ
Common questions
Why does the bot need to be an admin?
Does it work for channels?
Can I get it daily instead?
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
Read receipts you photograph
Send your bot a photo of a receipt and get the merchant, date and total back.
See how it worksGenerate images from a bot command
Type /img and a description, and your bot sends back a generated image.
See how it worksGet error alerts from your tools on Telegram
Any system that can send to a link can now alert you on your phone.
See how it worksKeep exploring
Set up “Weekly email of new members in a Telegram group” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.