โญ โœจ ๐Ÿ’ซ
Guide ยท AI ร— Marketing

An AI spy that finds dozens of ideas for posts, ads, funnels and sales

A step-by-step guide: how to build your own agent that reads private online-business chats for you every morning and delivers a finished report โ€“ client pains, plays that work, valuable trends and ideas for your project. No developer, no hand-coding, no reading chats by hand.

โฑ Setup time: 60โ€“90 minutes ๐Ÿ’ฐ Budget: from $25/mo ๐Ÿ›  Difficulty: beginner-friendly โœ๏ธ Paul Breit
What this is even about

In private online-business chats โ€“ chats of big schools, masterminds, niche communities โ€“ people talk about money, plays, failures and trends every single day. It's the most concentrated gold there is for a marketer and an entrepreneur. But nobody has time to read 20โ€“30 chats by hand every day.

The AI spy is a stack of an observer Telegram account, the Telethon library, Claude as the brain, and a Telegram bot that delivers a finished report to you. Set it up once โ€“ and from then on, every morning at 7:00, a digest is waiting in your DMs: what was discussed, which plays worked, what pains came up, what to take for yourself.

* Telegram, like everything we'll be setting up, is legal. Telethon is an open-source library built on the official MTProto API that millions of clients use. No hacking, no stolen passwords. You only enter chats an admin has already accepted you into, or that are public. It's the equivalent of reading the chat yourself, except now the AI reads it for you.

What's inside

  1. Why other people's chats are gold for marketing and sales
  2. What the AI spy is made of
  3. Sign up and pay for Claude
  4. A second Telegram account โ€“ why and how
  5. Telegram API keys (api_id and api_hash)
  6. Create a bot for the reports
  7. Get a VPS
  8. Install Claude Code on the VPS
  9. Build the AI spy with Claude's hands
  10. The chat list and how to get in
  11. How to use the daily report
  12. Account safety and risks
  13. What's next: upgrades and extensions

Section 01Why other people's chats are gold

Short version โ€“ because in chats people tell the truth. On their own channel an expert shows you a picture, on a landing page an offer, in an interview a position. But in a chat they tell a peer: "here's what isn't working for us right now," "an ad spend of $400 brought in 500," "those rushed warm-ups don't convert anymore."

That's the layer marketers spend years crawling toward through dozens of studies and interviews. And it's sitting right there in the open โ€“ in chats you've already been let into, or that are public.

What monitoring private chats actually gives you

The main point

Marketing built on someone else's hypotheses loses to marketing built on real conversations. The AI spy gives you the second one โ€“ without the hours spent reading feeds.

Section 02What the AI spy is made of

Let's get the big picture clear before diving into the steps. The AI spy is four components that work together on a single server.

ComponentRoleCost
Claude (Pro or Max)The agent's brain: reads messages, filters spam, writes the report$20/mo
Second Telegram accountJoins chats as an ordinary user and reads messages~$1 per number, one time
Telethon (library)Lets you read messages programmatically on behalf of the second accountFree
Telegram bot for reportsSends you the digest in your DMs at 7:00 a.m.Free
VPS serverSo all of this runs 24/7 while you sleep$5โ€“7/mo

That's ~$25โ€“27 a month total. One ad case from a chat that you see first and adapt will pay for the subscription a year in advance.

Why a second Telegram account

So you don't use your main one to monitor chats. Telegram sometimes bans accounts that behave "too actively" or that get caught up in mass reports. Losing your main account with all its contacts hurts. Losing a second one set up specifically for monitoring doesn't hurt at all. Set it up once and forget about it.

How it works in one sentence

Every morning at 7:00, Claude on the server fires up, logs into Telegram through Telethon under the second account, grabs all the messages from the last 24 hours across your list of chats, filters out spam and sales pitches, pulls out what's useful, writes a report โ€“ and delivers it to your DMs via the bot before you've even opened your eyes.

Section 03Sign up and pay for Claude

If you already have a working Claude Pro or Max and you've used Claude Code โ€“ skip this section and jump to the fourth.

If not โ€“ here's a short rundown. The full guide to signing up and paying is in the Threads article โ€“ it's covered in more detail there, I won't repeat it.

Step 1

If you're outside Anthropic's supported regions, use a VPN

Anthropic supports the US, EU and many other countries. If you happen to be somewhere it isn't available, a VPN with an EU, US, Turkey or UAE location will get you in. Options that work well: Proton VPN, Mullvad, or any reputable provider.

Step 2

Sign up at claude.ai

Use a Google account. Confirm your phone number โ€“ any regular mobile number works.

Step 3

Pay for Claude Pro โ€“ $20/mo

Any standard card works. It takes about 15 minutes from sign-up to a working subscription. Pick the monthly plan to start โ€“ you can always upgrade later if you need more headroom.

Which plan is enough

Claude Pro at $20/mo is plenty for the AI spy. One morning report is 5โ€“15 requests to Claude. That's up to 450 requests a month, comfortably inside Pro. If you want to run Threads in parallel and automate other tasks, get Max at $100 โ€“ its limits are 5x higher. Anthropic also has a Max 20x plan at $200/mo with limits 20x above Pro โ€“ for teams with heavy workloads.

Section 04A second Telegram account โ€“ why and how

A second account is the same move as a separate card for subscriptions: not critical, but it saves you from sudden losses.

What to know before signing up

One number, one account. Telegram ties an account firmly to a phone number. One number, one account. If you want a second one โ€“ you need a second number.

A virtual number works too. Telegram accepts numbers from any normal carrier. Virtual numbers from services like 5sim, SMS-activate or OnlineSim are fine. The price is around 30โ€“60 cents for a number that gets one SMS code and is never needed again.

Don't use stolen or dead numbers. Telegram occasionally asks you to re-validate an account. If the number was temporary and is no longer yours, you'll lose the account. Better to get a number for a decent period (for example, a 30-day rental for a few dollars) or a second real number from another carrier.

Step 1

Get a second number

5sim only has one-time activations โ€“ about $0.10 per number for Telegram. For a longer rental (30 days or more) use OnlineSim โ€“ the "Rental" plan starts around $4. The site is onlinesim.ru; pick a country (the US, UK, or another with Telegram support) and grab a number that supports Telegram.

The alternative: a second SIM card from another carrier that you use only for this.

Step 2

Install Telegram on a second device or turn on a second profile

On mobile Telegram for iOS / Android you can hold up to three accounts at once โ€“ tap the three lines at the top left โ†’ the little arrow next to your name โ†’ "Add Account." Register the new account with the second number.

The alternative is the web version at web.telegram.org, or a second device, so the new account doesn't get in the way of your main app.

Step 3

Set the account up to look "neutral"

Use a real or neutral name (Anna Johnson, Michael Peters). No "spy bot" usernames, no empty accounts with a single avatar. Add a normal photo and a short bio that mimics a real user. This lowers the chance that a chat admin kicks you for looking suspicious.

Don't DM anyone from this account, and don't join 30 chats in a row on day one. A few chats a week is fine โ€“ and behave like a normal passive reader.

An important safety rule

Don't tie the second account to your main email, don't use it for payments, and don't keep any important conversations on it. This account is a disposable tool. If it ever gets banned, you set up a new one in 10 minutes, no real loss.

Section 05Telegram API keys (api_id and api_hash)

For Claude to log into Telegram through Telethon under your second account, you need two keys: api_id and api_hash. It's free, done on Telegram's official site, and takes 5 minutes.

Step 1

Go to my.telegram.org

Open my.telegram.org โ€“ it's Telegram's official portal for developers. Log in with your second number (the one you just used for the second account). Telegram will send a code to the app โ€“ enter it.

Step 2

Open the API development tools section

On the main page, click "API development tools." If it's your first time, you'll be asked to fill out a form: app name, a short description, platform. Fill it in freely: "Personal Reader," "Internal monitoring tool," platform Desktop. Nobody checks this form โ€“ it's there so you agree to the API terms of use.

Step 3

Copy api_id and api_hash

After you save the form, you'll land on a page with the keys. api_id is a number (8 digits). api_hash is a long string of letters and digits. Copy both values and save them somewhere safe โ€“ a password manager or a private note. You'll need them at the build stage.

Never show anyone your api_hash

The api_hash is essentially the password for your app. If it falls into the wrong hands, someone could write to Telegram in your name. Don't publish it in code on GitHub, don't send it in open chats. If you accidentally leak it, you can generate a new one at my.telegram.org.

Section 06Create a bot for the reports

You need a bot to send you the report in your DMs every morning โ€“ more convenient than reading off the server. The bot is made for free in Telegram through a special bot called @BotFather. A minute of your time.

Step 1

Open @BotFather in Telegram

Search Telegram for @BotFather, pick the account with the checkmark (the official Telegram bot). Tap "Start."

Step 2

Create a new bot

Send the command /newbot. BotFather will ask for the bot's name (anything, for example "My AI Spy") and a username (it must end in bot, for example neuro_spy_paul_bot). The username must be available โ€“ if it's taken, come up with another.

Step 3

Save the bot token

BotFather will send a message with a token โ€“ a string like 1234567890:AAEhBOweik9ai2vSgMy_qkW9qpL7wsApg9I. This is your bot's password, copy it and save it to the same place as the api_id / api_hash.

Step 4

Find out your chat_id

So the bot knows who to send the report to, find the bot @userinfobot in Telegram and tap Start. It'll send you your ID โ€“ a number like 265489854. Save it too.

Step 5

Send your bot the first message

Find your new bot (by the name you gave it), tap Start, send any message like "hi." This is needed so Telegram "opens" the channel to you โ€“ without a first message from you, the bot can't reply to you in DMs.

At this point you have everything "user-side"

Recap: a second TG account, its api_id and api_hash, the bot token, your chat_id. These four things plus Claude are enough to build the AI spy. Next up โ€“ the server and the build.

Section 07Get a VPS

A VPS is a rented computer in a data center that runs 24/7 without you. It's the heart of the system: while you sleep it reads chats, while you have lunch it writes the report.

Why a VPS and not a laptop

On a laptop the script only runs while the laptop is open and connected to the internet. Close the lid and monitoring stops. If you're doing this for serious work, not a test, you need a server.

Plus a VPS sits in a stable data center. Telethon runs cleanly on a proper server, and the connection stays solid โ€“ no flaky home Wi-Fi to worry about.

Where to get a server

Any inexpensive VPS works for our task. The easiest to work with is Hetzner Cloud โ€“ cheap, reliable, with data centers in the US and EU.

๐Ÿš€

I recommend Hetzner Cloud

Stable, cheap, and you can pay with any regular card. A server at $5โ€“6/mo is plenty for the AI spy, with room to spare.

Go to Hetzner Cloud โ†’

Any reputable cloud host will do the job โ€“ pick whichever you're comfortable with.

Which server to order

ParameterValue
LocationUS or EU
OSUbuntu 24.04 LTS
CPU1โ€“2 cores
RAM2 GB
Disk20 GB SSD
Budget$5โ€“6/mo

After it's created, save the server's IP address and root password โ€“ you'll need them on the next step, when we move Claude in.

Section 08Install Claude Code on the VPS

Here's the fun part. Instead of typing a dozen commands into a terminal, you'll open Claude Code on your computer and just tell it in words what needs doing. It connects to the server and installs everything itself.

If you don't have Claude Code on your computer yet, download it from claude.com/claude-code, install it, and log into your Anthropic account. After that you're ready.

Step 1

Open Claude Code and give Claude the task

Copy this message into the chat, swapping in your own values:

I have a VPS on Hetzner Cloud:

IP: 185.12.45.67
User: root
Password: MyPassword123

Connect over SSH and prep the server for an AI spy.

Plan:
1) Update the system, install python3, pip, screen.
2) Install Claude Code on the server and authorize
   it under my account (I'll enter the code via the link).
3) Install the telethon and python-telegram-bot libraries.
4) Create a folder /root/spy and prepare an empty
   config.env file there โ€“ I'll drop the keys in.
5) Check that everything works: run a short
   ping in Telethon with my api_id / api_hash.

Claude will ask clarifying questions (for example: "should I start the install?") โ€“ answer "yes." After that it mostly happens on its own: you watch the commands run, occasionally Claude asks your permission to install something, you say "yes."

Step 2

Authorize Claude on the server

Once Claude installs its code on the VPS, it asks you to authorize: it gives you a link to open and a code to enter. After authorization Claude is on the server โ€“ with the same account and the same subscription you have on your computer.

Step 3

Put the keys in config.env

In the Claude Code chat, write:

Write these variables into /root/spy/config.env
(in KEY=VALUE format, one per line, no spaces):

TG_API_ID=12345678
TG_API_HASH=string-from-my-telegram-keys
TG_PHONE=+1XXXXXXXXXX  (the second account's number)
BOT_TOKEN=bot-token-from-BotFather
MY_CHAT_ID=my-id-from-userinfobot

Claude creates the file, sets permissions to 600 (root only can read), and makes sure the data inside is correct.

What just happened

From a chat with Claude on your laptop, you configured a whole server with authorization, libraries and a config file. Without a single command typed by hand. That's what "agency" means โ€“ Claude doesn't just advise, it does. The rest will be in the same style.

Section 09Build the AI spy with Claude's hands

The AI spy script itself is a Python file, ~150 lines, that runs once a day and does three things: reads the chats, hands the messages to Claude, sends the answer to the bot. Claude writes this file for you. Your job is to phrase the task well.

Step 1

Describe to Claude what the AI spy should do

In Claude Code (still connected to the server), write out a detailed spec:

In the folder /root/spy, build an AI spy.

Files to create:

1) spy.py โ€“ the main script. It does the following:
   - Reads config.env
   - Authenticates to Telegram via Telethon
     with TG_API_ID, TG_API_HASH, TG_PHONE
     (the session must persist, not ask for an
     SMS every time)
   - Takes the chat list from chats.txt
   - Collects all messages from the last 24 hours
     across those chats
   - Cleans out obvious spam and lone "+++" / stickers
   - Saves everything into one big text
     file /root/spy/messages_today.txt

2) summarize.py โ€“ passes messages_today.txt to Claude
   via the Claude Code SDK / API and asks it to build a report
   in this structure:
   - DATA QUALITY (how many chats read,
     how many real messages)
   - PLAYS THAT WORK (specific cases with numbers,
     if mentioned)
   - TRENDS (what's discussed more than usual)
   - AUDIENCE PAINS (what isn't working, what
     people complain about)
   - CASES (if anyone openly named result
     numbers)
   - IDEAS FOR CONTENT AND ADS
   Saves the result to /root/spy/report.md

3) deliver.py โ€“ takes report.md and sends it
   via the Telegram bot to MY_CHAT_ID. If the
   report is longer than 4000 characters, it splits it
   into parts and sends several messages.

4) chats.txt โ€“ an empty file, I'll fill it in
   myself with a list of chat links.

5) run_daily.sh โ€“ a bash script that runs
   spy.py โ†’ summarize.py โ†’ deliver.py in order.

6) A cron job: run run_daily.sh every
   day at 7:00 in my time zone
   (America/New_York). Save logs to
   /root/spy/log_YYYY-MM-DD.txt.

Handle everything โ€“ install what's missing,
test each stage, all as root, in /root/spy.
When it's ready, tell me what to check, and
let's run a test right now on a single chat.

Claude will ask a couple of clarifying questions (for example: "use the Claude API directly or the Claude Code SDK?"); you answer based on your subscription โ€“ on Pro it's simpler via the Claude Code SDK, which is already installed. Then Claude assembles it all.

Step 2

Authorize the second TG account in Telethon

On the first run Telethon will ask for an SMS code to log into Telegram โ€“ Claude will write in the chat: "enter the code that came to Telegram." Open your second account, copy the code, give it to Claude. After that Telethon saves the session to a file (for example, spy.session) and never asks for the code again โ€“ it logs in on its own.

Step 3

Run a test on a single chat

Put one test chat in chats.txt โ€“ say, a link to any public chat your second account has already joined. Tell Claude: "run the full cycle now, don't wait for cron." In 2โ€“5 minutes the first report lands in your DMs. Check that everything reads cleanly, the report makes sense, and the formatting didn't break.

What we've built at this point

A fully working AI spy: it reads chats, writes a report, sends it to Telegram, runs on a schedule. Next โ€“ load it up with the right list of chats and tweak the report prompt to fit your business.

Section 10The chat list and how to get in

The spy is only as good as the chats it watches. A graveyard of dead links โ€“ and every morning you'll get an empty report. So build the list with care.

Where to find chats

How to behave in them

The main rule โ€“ don't blow your cover. Don't write anything in the chat from this account at all. Don't like, don't react. A passive reader who occasionally drops by. That's the basic behavior of an "ordinary subscriber" that doesn't draw admin attention.

If some chat asks you to verify (send a video selfie, answer a question) โ€“ do that step deliberately: answer once and then live quietly. It's worth 5 minutes โ€“ weigh it against the value of a month of reports.

How many chats is optimal

15โ€“25 live chats is the sweet spot. Fewer โ€“ not enough material, the report will be thin. More โ€“ Claude starts to tire, miss important things, and your request costs balloon.

Better to have 15 concentrated chats full of experts than 50 chats full of spam and course pitches. Review the list regularly (once a month): which chats give signal, which have turned into a dumpster โ€“ delete the dead ones, add new ones.

The chats.txt format

You just put a list of links in the file โ€“ one per line. For example: https://t.me/expert_chat_paul, https://t.me/joinchat/AAA-BBB, @public_chat_name. Telethon understands all three formats.

Section 11How to use the daily report

Getting the report is half the job. The other half is actually working with it. Otherwise an expensive subscription turns into one more email you scroll past.

A simple "10 minutes in the morning" system

Open the report over coffee, before the workday starts. Don't read it straight through from top to bottom โ€“ go through the sections with a highlighter:

From 7 morning reports a week you get 3โ€“5 clearly adaptable elements. Over a month โ€“ 12โ€“20 ready marketing moves, none of which you had to invent "out of your head."

How to turn reports into sales copy

The most powerful thing โ€“ take the word-for-word pains from chats and drop them into your sales copy: into lead magnets, warm-ups and offers from the 5-stage expert auto-funnel. When an ad says "you know how frustrating it is: subscribers like your stuff but there's no money," that works ten times harder than "we boost sales." Because the person recognizes their own phrase.

Once a week, go through your report archive and build a "phrase swipe file" โ€“ the stickiest lines that come up again and again from different people. They'll become headlines, leads and objection-handlers in your offers.

The main shift

Marketing stops being a guessing game. You start making every decision based on what your audience said yesterday. Not "I think people would find this interesting," but "yesterday, in six different chats, people asked about X ten times." The difference in conversion is twofold and more.

Section 12Account safety and risks

Telegram doesn't forbid monitoring โ€“ you only read what the admins allowed you to read. But Telegram has anti-spam mechanics that can catch any "too automated" account. To avoid trouble, stick to three simple rules.

Rule 1: don't read too fast

If the script tries to "grab the entire history of all chats in one pass," Telegram may temporarily limit the account. The fix โ€“ Telethon adds pauses between requests on its own. Don't remove them in an attempt to speed things up โ€“ you'll save nothing and just lose the account.

Rule 2: one account, one server

Once you log into Telethon on the VPS, Telegram remembers that server. If you open the same account on three other devices in parallel, Telegram gets suspicious. Logged in on the server โ€“ don't use that account from other devices.

Rule 3: don't read chats you're not in

Telethon can technically only read chats your account has already joined. No "sneaking in without an invite" โ€“ it doesn't work and it isn't needed. Read only what you're legitimately registered in.

What to do if the account gets banned anyway

Don't panic: you only lost a tool. Get a second number, a new account, rejoin the chats โ€“ and carry on. Your main business and contacts weren't touched, because we used a separate account from the start. That's the whole point of two accounts: so a risk like this never reaches the things that matter.

Section 13What's next: upgrades and extensions

Once the basic spy is working and you've gotten used to the morning reports, the extensions suggest themselves. Here are the directions people move in once they've used the system for 2โ€“3 months.

Real-time reaction, not once a day

The basic spy makes one report a day. You can set up a second, instant loop: the moment a message appears in any chat where someone openly names a result number (for example, "did a million in a month") โ€“ Claude immediately parses the context and sends you the clip. Within 30 seconds you know about a fresh case ahead of the whole market.

A link to a content generator

On top of the report you can hook up a second agent that automatically turns the "content ideas" from the daily digest into three post variations. A ready prompt for this kind of auto-generation is in the 10 prompts for experts collection. You attach ready drafts to your morning read โ€“ all that's left is to pick one, polish it and publish.

Segmenting by specific projects / niches

If you have several directions, keep several chat lists and several reports: one for the main business, another for the new niche, a third for experiments. Claude builds each report toward its own goal โ€“ the task phrasing is different.

A link to your CRM

The word-for-word pains from other people's chats are perfect material for the first level of the "hook" in the Meaning Pyramid that a sales post is built on. The pains the spy catches regularly can be auto-filed into a separate collector table โ€“ a "phrase bank." When a copywriter / media buyer writes an ad, they look in the bank, not in their own head. That's already a systemic shift for the team, not just for you.

How far this can go

The spy is the first brick. Once it's working, it becomes clear how to stack the other bricks on top: content auto-generation, CRM analytics, monitoring specific competitors, forecasting trends. In six months you don't have one agent โ€“ you have a whole team of agents running your marketing faster than any in-house department. And it costs less than a single junior marketer.

FAQFrequently asked questions

How is the AI spy different from the AI client hunter?

The AI client hunter reads public channels and brings you post ideas. The AI spy reads private chats and brings you client pains, plays and trends.

Is it legal to read other people's chats?

Yes. You only read chats you've been accepted into. Telethon is an open-source library built on the official API. It's the equivalent of you reading the chat yourself.

Can I use my main account?

Better not to. Get a second number and a second account just for monitoring. Safer and more convenient.

How many chats can one agent realistically handle?

20โ€“30 chats a day with no problem. Beyond that the report gets too long โ€“ better to split it into two themed groups.

โœจ Free

Let's build your client-acquisition system with AI and a blog

Book a free consultation. Together we'll map out a step-by-step plan for your niche โ€“ where to start so you get up to 5-7 leads a day.

Book a free consultation
It's free and there's no obligation