Paste these into your AI chat one at a time. Test after each step before you go on.
1Plan it first
I am not a coder. I want to build a small Python program that reads public Telegram groups and finds people asking for a service in my niche: [YOUR NICHE]. It should: 1) filter messages by keywords, 2) send only matching messages to a cheap AI model to decide if it is a real request, 3) send real requests to me through a Telegram bot. Explain the plan in plain English and list the accounts I need. No code yet.
2Connect to Telegram and just print messages
Write a short Python script with the Telethon library. It logs in with my spare Telegram account (API ID and hash read from a .env file) and prints each new message from my groups with the group name and the sender's @username. Tell me how to install Python and run it the first time.
3Build the keyword list
My niche is [YOUR NICHE] in [YOUR CITY]. Write 500 keywords and short phrases people use when they ask for this service in a group chat. Include trade names, the jobs themselves, and ways of asking ("need aโฆ", "who knows a goodโฆ", "recommend aโฆ"). Add common versions in [LANGUAGES YOUR COMMUNITY USES]. Then add 20 "blocker" phrases for job ads and spam. Save them as keywords.txt and blockers.txt, one per line.
4Add the free keyword filter
Load keywords.txt and blockers.txt. Skip a message if it has no keyword, has a blocker, or is the same text already seen in another group today. Print "KEYWORD HIT: <keyword>" for the rest. Count messages seen and keyword hits.
5Let a cheap AI judge each hit
For each keyword hit, call the cheapest model of [AI PROVIDER] with this job: "Is this a real person asking to hire a [YOUR NICHE] service? Answer only JSON: {"is_lead": true/false, "reason": "one short sentence"}." Adverts, job posts, stories about past work, and requests for other services are NOT leads. Read the API key from .env. Wait 3 seconds between calls and retry if the API is busy. Log the cost of each call.
6Send leads to your phone
Create the alert step. I made a bot with @BotFather and have its token and my chat ID. When the AI says is_lead is true, send me a bot message with: the group name, the original message, the sender's @handle, and the AI's reason. Add a last line: "Tip: reply with a 30-second video circle." Do not include names, phone numbers or anything else about the person.
7Keep it running 24/7
Help me run this nonstop. Option A: a $5 a month Linux server with a service that restarts it if it crashes. Option B: my laptop, kept awake. Give exact steps for both, plus how to check the logs and the daily AI cost.