Quick start: from zero to running, no steps skipped

Just follow along โ€” about 15 minutes total. Every step tells you which screen to open and what to tap, plus the pitfalls people actually hit.

Contents Checklist Step 1 ยท Create your bot in BotFather (two critical switches) Step 2 ยท Link the bot in Telegram Business Step 3 ยท Create your console forum group Step 4 ยท Get the three IDs & keys Step 5 ยท Fill in .env Step 6 ยท Launch Step 7 ยท Test chat Troubleshooting

๐Ÿงพ Checklist

1Create your bot in BotFather

In Telegram, search for @BotFather (look for the blue verification badge) and have this conversation:

๐Ÿค– BotFather
/newbot
BotFatherAlright, a new bot. How are we going to call it? Please choose a name for your bot.
LingoDesk Assistant
BotFatherGood. Now let's choose a username for your bot. It must end in bot.
my_lingodesk_bot
BotFatherDone! Use this token to access the HTTP API:
8123456789:AAHfK3xxxxxxxxxxxxxxxxxxxxxxxxx
Keep your token secure and store it safelyโ€ฆ

1a. Turn on Business Mode (required)

Still inside BotFather:

/mybotsโ†’ @my_lingodesk_botโ†’ Bot Settingsโ†’ Business Modeโ†’ Turn on
Without Business Mode your bot won't even show up in the Telegram Business chatbot list in Step 2. This is the single most common blocker.

1b. Turn off Group Privacy (required)

/mybotsโ†’ @my_lingodesk_botโ†’ Bot Settingsโ†’ Group Privacyโ†’ Turn off
Privacy is on by default, and while it's on the bot cannot see the replies you type in your console group โ€” the symptom is "I type in the topic and nothing happens". Turn it off (BotFather must say Privacy mode is disabled).

2Link the bot in Telegram Business

On the mobile Telegram app (this setting currently exists only on mobile):

โš™๏ธ Settingsโ†’ ๐Ÿ’ผ Telegram Businessโ†’ ๐Ÿค– Chatbots
  1. Type your bot's username (e.g. my_lingodesk_bot) in the search box and select it.
  2. Permissions: enable "Reply to messages" โ€” without it the bot can read but can never send on your behalf.
  3. For "which chats", choose All 1:1 Chats; add any private contacts you want to keep out of the relay to the Excluded Chats list.
Once linked, every private message you receive is silently "cc'd" to the bot โ€” the other side notices nothing, and your own chat experience doesn't change at all.

3Create your console forum group

This group is your workbench: one topic per contact, with bilingual message cards popping up inside.

  1. Create a group: New โ†’ New Group, add your bot as the only member (search its username). Name it anything, e.g. "LingoDesk Console".
  2. Enable Topics: open the group โ†’ tap the name for its profile โ†’ Edit โ†’ toggle Topics on. The group upgrades to a supergroup and gets a topic list.
  3. Promote the bot to admin: profile โ†’ Administrators โ†’ Add Admin โ†’ your bot โ†’ check "Manage Topics" (leave the rest default) โ†’ save.
The bot creates a topic automatically for each contact. Without admin rights + "Manage Topics" that fails โ€” the symptom is "a customer wrote to me but nothing appears in the group".
The group only needs you and the bot โ€” no other humans. If you add a partner, their replies in a topic trigger translation and sending just like yours.

4Get the three IDs & keys

4a. ANTHROPIC_API_KEY (the translation engine)

  1. Open console.anthropic.com and sign up / sign in.
  2. Sidebar API Keys โ†’ Create Key โ†’ copy the sk-ant-โ€ฆ string (shown only once โ€” store it).
  3. Add a few dollars under Billing โ€” the default Haiku model costs roughly $0.001 per translated message, so a few dollars lasts a long time.

4b. First contact with the code: install deps + set BOT_TOKEN

In a terminal, inside the LingoDesk folder:

git clone https://github.com/sanxiaozi/lingodesk.git cd lingodesk npm install cp .env.example .env

Open .env in any editor and fill in just one line for now: BOT_TOKEN=the token from Step 1. Save.

4c. FORUM_CHAT_ID and OWNER_USER_ID: one command

  1. Post anything (e.g. "test") in your console group.
  2. From your own account, open a private chat with the bot (search its username) and send /start.
  3. Back in the terminal:
npm run ids โ”€โ”€ Chats (the supergroup row starting with -100 = FORUM_CHAT_ID) โ”€โ”€ -1002345678901 supergroup ยท LingoDesk Console โ”€โ”€ Users (your own row = OWNER_USER_ID) โ”€โ”€ 712345678 Jason @your_username
The two highlighted numbers are the values you need. If the output says "(empty)", those two messages haven't been sent yet โ€” send them and rerun. If you get a 409, the bot is currently running โ€” stop it first.

5Fill in .env

Complete your .env (all other lines can stay at their defaults):

# The four required values BOT_TOKEN=8123456789:AAHfK3xxxxxxxxxxxxxxxxxxxxxxxxx FORUM_CHAT_ID=-1002345678901 OWNER_USER_ID=712345678 ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxx # Optional: OpenAI fallback (auto-switches if Claude has an outage โ€” recommended) OPENAI_API_KEY=sk-xxxxxxxx

6Launch

npm run db:push ๐Ÿš€ Your database is now in sync with your Prisma schema. npm run dev โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿš€ LingoDesk is up, bot = @my_lingodesk_bot Receive โ†’ translate โ†’ reply โ†’ translate relay: ยท Customers DM your personal account โ†’ auto-translated card in your console topic ยท You type in a topic โ†’ preview โ†’ sent in their language, as you โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

That banner means it's alive. db:push initializes the local database on first run โ€” you won't need it again.

One bot token = one running instance, globally. A 409 Conflict means another process is still holding it (e.g. a previous run that never exited) โ€” stop everything, then start again.

7Test chat

From a different Telegram account (a second account or a friend), send a foreign-language DM to your personal account (not to the bot!) โ€” say, "Hola, ยฟcuรกnto cuesta?" in Spanish. Within seconds, a new topic named after the sender should appear in your console group:

๐Ÿ“‹ LingoDesk Console ยท topic: @amigo_es
my_lingodesk_bot๐Ÿ†• New contact @amigo_es (es)
Original: Hola, ยฟcuรกnto cuesta?
๐ŸŒ Hi, how much does it cost?
โ”€โ”€โ”€โ”€โ”€
โ†ณ Type here in your language โ€” it goes out in es, sent as you
Package A is $100 and includes all features.
my_lingodesk_bot๐Ÿ“ค Translation preview (โ†’es), sent only after you confirm:

El paquete A cuesta 100 dรณlares e incluye todas las funciones.

(Your message: Package A is $100โ€ฆ)

[ โœ… Send to customer ] [ โœ๏ธ Cancel ]

Tap "โœ… Send to customer" โ€” the other side sees your personal account replying in fluent Spanish. The whole loop is now live ๐ŸŽ‰

๐Ÿ”ง Troubleshooting

A customer wrote to me but nothing appears in the console group

Check in order: โ‘  BotFather โ†’ Business Mode is turned on (Step 1a); โ‘ก Telegram Business โ†’ Chatbots has your bot linked and that chat is within scope (Step 2); โ‘ข the bot is a group admin with "Manage Topics" (Step 3); โ‘ฃ the bot process is still running in your terminal without errors.

I type in a topic and the bot does nothing

Nine times out of ten it's Group Privacy still on (Step 1b). BotFather โ†’ Bot Settings โ†’ Group Privacy โ†’ Turn off, then remove the bot from the group and re-add it (the change only applies after rejoining), and promote it to admin again.

Startup fails with 409 Conflict

Two instances are running on the same token. Find and stop the old process (Ctrl+C or pkill -f "tsx.*main.ts"), wait ten seconds, start again.

"Send to customer" fails: contact inactive too long

A Telegram restriction: if a conversation has been idle too long, the bot can't initiate on your behalf (BUSINESS_PEER_USAGE_MISSING). Ask them to send anything to reactivate, or reply manually from your phone this once.

Send fails: business connection invalid

Go to Settings โ†’ Telegram Business โ†’ Chatbots, remove and re-add the bot โ€” or simply wait for the customer's next message, which lets the bot capture a fresh connection automatically.

Wrong language detected / want a different target language

The language locks on the contact's first message (to avoid flip-flopping on short texts). Send /lang code in that contact's topic to correct it, e.g. /lang pt (Portuguese) or /lang ar (Arabic).

After a restart, old "Send / Cancel" buttons stopped working

Pending previews live in memory and expire on restart (the button will tell you). Just type your reply again in the topic. Contacts and chat history live in the database โ€” nothing is lost.

๐ŸŽ‰ All working?

From now on, customers write in whatever language they like โ€” you just type in yours. If something breaks, run through the troubleshooting list above first; still stuck, email us with a screenshot of the terminal error.

โœ‰๏ธ hello@lingodesk.org