Telegram

The quickest channel to get running: create a free bot with @BotFather, paste one token into the org portal, and your team can drive their CAD from their phones.

New to channels? Read Channels & Messaging first for the overall picture. This page is the complete Telegram walkthrough.

The connection at a glance

Telegram is the only channel where CADCoPilot calls out rather than being called: our server long-polls Telegram for new messages. Nothing has to be opened towards your network, and no webhook is registered with Telegram.

How a Telegram message reaches your CAD workstation You message your company bot in Telegram. The Telegram Bot API holds the message until the CADCoPilot server collects it by long polling with the bot token. The server identifies which organization the bot belongs to, maps your Telegram user id to your CADCoPilot account, checks your plan, then pushes the message over the SignalR relay hub to the tray Agent on your PC, which passes it to the CAD add-in over a local named pipe. The reply travels back the same way and is sent with the Telegram sendMessage API using the same bot token. Telegram — inbound down the solid line, reply up the dashed line Your phone — Telegram app you message your company's bot in a normal Telegram chat credential: your own Telegram account chat message Telegram Bot API queues the message for the bot until it is collected https://api.telegram.org/bot<token>/getUpdates outbound long poll from our server credential: bot token 123456:ABC-DEF… CADCoPilot server — Telegram poller one poller per company bot token, started when the server starts the token identifies the organization — no webhook needed sender = your Telegram user id ChannelRouter — who are you? Telegram user id → your CADCoPilot account, then the plan check /start <code> creates the link the first time pushed to your PC only SignalR relay hub → tray Agent on your PC the Agent connects using your own CADCoPilot sign-in wss://www.cadagent.plmcadutilities.com/hubs/relay local named pipe Your CAD application SOLIDWORKS, Inventor, NX or Solid Edge — launched if not running CADCoPilot_<CAD>_Chat Reply — same path, reversed CAD → add-in → tray Agent → back over the relay hub → matched to your waiting    message (10 minute limit) → sendMessage to your chat id    credential: the same bot token Text is split into 4000-character parts. Screenshots are sent as Telegram photos.

Step by step

IT admin Create the bot in Telegram

There is no console to log into and nothing to buy — bots are created by chatting with Telegram's own bot. Anyone with a Telegram account can do it, but keep the resulting token treated as a company secret.

  1. In Telegram, search for @BotFather (the one with the blue verified tick) and open a chat with it.

  2. Send /newbot.

  3. BotFather asks for a display name — what users see at the top of the chat. Something like Acme CAD Copilot.

  4. BotFather then asks for a username. It must be unique across all of Telegram and must end in bot — for example AcmeCadCopilotBot. This becomes the bot's handle, @AcmeCadCopilotBot, and the address your users will search for.

  5. BotFather replies with the token. It looks like this:

    8123456789:AAF3xQ2m-Kd7bN0pV5rT9yLwZs1cE4hJ6uQ

    Its shape is fixed: the bot's numeric id, a colon, then a ~35-character secret. Copy the whole thing including the digits before the colon. Treat it like a password — anyone holding it can read and send every message the bot sees.

  6. Optional but recommended. Still in BotFather: /setdescription and /setabouttext so users see what the bot is for, and /setuserpic for the company logo. /setprivacy can stay at its default — CADCoPilot only ever uses direct chats with the bot, not groups.

One bot per organization. A Telegram bot token can only be collected by one poller at a time — if the same token were used twice, Telegram would reject one of them. CADCoPilot runs exactly one poller per company token, so do not reuse a token that is already in use somewhere else (for example in a personal automation).

Org admin Save the token in the org portal

  1. Sign in to the org portal as an organization admin and open Messaging Channels.

  2. In the Telegram panel, make sure Enabled is ticked (it is by default) and paste the token into Bot token.

    The Telegram panel in the org portal with the Enabled checkbox and Bot token field
    The Telegram panel. One field: the bot token from @BotFather.
  3. Leave User self-connect ticked if you want people to link their own Telegram accounts from the CAD add-in or tray Agent. Untick it if linking should be handled another way — the Connect buttons then grey out and the server refuses link requests.

  4. Press Save. The page confirms the save and reminds you that a newly added bot starts working after the messaging service restarts.

  5. Ask for the server to be restarted (or wait for the next restart) before testing. This is the one Telegram gotcha worth knowing — see below.

A new bot token needs a server restart. The Telegram pollers are created once, when the CADCoPilot server starts, by reading every organization's saved token. Adding or changing a token afterwards does not start a new poller — the bot will look completely dead until the service is restarted. WhatsApp and Teams have no equivalent limitation, because they are webhook-driven and read their credentials on every message.

End user Connect your own Telegram

One click, once. You need to be signed in to CADCoPilot from the CAD add-in on the PC you want to drive.

  1. Open Settings → Messaging Channels in the CAD add-in, or the tray Agent status window. Telegram should read enabled.

    The Messaging Channels section of the add-in Settings dialog, with a Connect button next to Telegram
    Settings → Messaging Channels. Telegram shows enabled/connected status and a Connect button.
  2. Press Connect next to Telegram. CADCoPilot asks the server for a one-time code and builds a deep link that carries it:

    https://t.me/AcmeCadCopilotBot?start=3f9c1a7e5b2d4c8e9a0f6b1d7e2c5a48

    The code is 32 hexadecimal characters, valid for 30 minutes, and can be used once.

  3. Confirm the prompt. Your browser hands the link to the Telegram app, which opens the company bot with a Start button. Press it.

    Behind the scenes that sends /start <code> to the bot, which is how the server learns that this Telegram account is you.

  4. The bot replies:

    “Linked! You can now drive your CAD from here.”

    Back in Settings, press Refresh status — Telegram now reads connected.

  5. If the deep link does not open (for example on a locked-down PC), the dialog still shows the code. Open the bot manually in Telegram and send:

    /start 3f9c1a7e5b2d4c8e9a0f6b1d7e2c5a48

    Sending just the bare code as a plain message works too.

End user Your first test message

Make sure the tray Agent is running and shows a connection to the server, then send the bot something small and verifiable:

What CAD applications are running on my PC?

Then something that actually builds geometry:

Create a new part and make a 50 mm cube

CADCoPilot launches your CAD application if it is not open, creates the part, and replies in the chat. Ask it to prove the result rather than trusting the wording of the answer:

What is the volume of the current part? Send me a screenshot
A Telegram conversation with the CADCoPilot bot showing a modelling request and the reply
A live Telegram conversation. Screenshots come back as photos in the same chat.

Exact values

Where What goes in it Format / example
Org portal → Messaging Channels → Telegram → Bot token The token @BotFather gave you 8123456789:AAF3xQ2m-Kd7bN0pV5rT9yLwZs1cE4hJ6uQ — digits, colon, secret
Telegram side Nothing to configure No webhook URL, no callback, no allow-list. CADCoPilot polls Telegram outbound.
User link deep link Generated for you by Connect https://t.me/<botusername>?start=<32-hex code>
Link code Single use, 30 minutes 32 lower-case hex characters

Re-saving and rotating the token

Troubleshooting

Symptom Cause Fix
The bot never answers anything, not even the link prompt. The token was saved after the server started, so no poller exists for it. Restart the CADCoPilot server. This is the single most common Telegram problem.
Still silent after a restart. The token is wrong, was revoked, or the Telegram panel is not ticked Enabled. Re-copy the token from BotFather (/token), paste it fresh, tick Enabled, save, restart.
Messages arrive erratically — some answered, some not. The same bot token is being collected by something else as well; Telegram gives each update to only one collector. Use a dedicated bot for CADCoPilot. Stop any other tool or test script using that token.
“This account isn't linked to CADCoPilot.” This Telegram account has never completed the /start <code> handshake. Press Connect in the add-in or tray Agent and open the deep link.
Pressing Start in Telegram did nothing — still not linked. The code expired (30 minutes), had already been used, or Telegram opened the bot without the start payload. Press Connect again for a fresh code and send /start <code> manually in the chat.
The Connect button is greyed out. Your org admin has turned off User self-connect, the channel is not enabled, or you are not signed in from the add-in. Sign in from the CAD add-in first; then ask your org admin to re-enable self-connect.
Someone else's phone is driving your CAD. Your one-time code was used from their Telegram account, so their Telegram id is linked to your CADCoPilot user. Have that person press Connect in their own CADCoPilot and start the bot with their code — the Telegram id is repointed to them. Never paste a link code into a shared chat.
“No active CADCoPilot agent found on your PC.” The tray Agent is stopped, or lost its connection after a server restart and its retries ran out. Open the tray Agent, press Stop then Start, and confirm it reports connected. Your Telegram link survives; only the workstation connection has to be re-made.
A long reply arrives in several messages. Not a fault — replies are split into 4000-character parts. Ask for shorter answers, or read the full transcript in the CAD chat panel.

Security

Related