Skip to content

Set Up Telegram

Pinchy supports Telegram as a channel for your agents. Each agent can have its own Telegram bot, and users link their Telegram account once to access all bots they have permission to use.

  • A running Pinchy instance with at least one agent
  • A Telegram account
  • Admin access to Pinchy
  1. Open BotFather in Telegram (or use the desktop/web app for easy copy-paste)
  2. Send /newbot
  3. Choose a display name for your bot
  4. Choose a username ending in bot (must be unique on Telegram)
  5. Copy the bot token BotFather gives you
  1. Go to Settings → Telegram
  2. Click Set up Telegram
  3. Paste the bot token
  4. Click Connect

Settings → Telegram with bot setup and user pairing

Your bot token is encrypted at rest and never leaves your server.

After an admin connects a bot, each team member links their own Telegram account:

  1. Go to Settings → Telegram
  2. Scan the QR code with your phone (or click "Open in Telegram")
  3. Send any message to the bot
  4. Copy the pairing code from the bot's response
  5. Paste it into Pinchy and click Link

You're now linked. Messages you send to the bot are answered by the agent.

Send a photo or a file to the bot, and Pinchy mirrors it into the agent's workspace automatically — no upload step needed. The agent can then read it, or hand it to a tool like odoo_attach_file, the same way it would a chat attachment or an email attachment. See Attachments for how this fits into the rest of the upload system.

A couple of things worth knowing:

  • Size limit: Telegram bots can only download files up to 20 MB, so that's the effective ceiling — Pinchy's own mirror limit is a more generous 25 MB.
  • Photo vs. file: Telegram recompresses and strips metadata from anything sent as a photo, and replaces the filename with a generated one. If you need the original quality — full resolution, EXIF data, the real filename — send it as a file/document instead of a photo. For everyday things like receipts, either way works fine.

Each agent can have its own Telegram bot. To connect a second agent:

  1. Create a new bot via BotFather (repeat Step 1)
  2. Go to Agent Settings → Telegram for the agent you want to connect
  3. Paste the new bot token and click Connect

Agent Settings → Telegram tab with bot connection

Telegram access follows Pinchy's permission model:

  • Agents with visibility "All": Every linked user can message the bot
  • Restricted agents: Only users in the agent's allowed groups (and admins) can message the bot
  • If a user messages a bot they don't have access to, they receive a pairing prompt instead of an agent response

When group memberships or agent visibility change, Telegram access is updated automatically.

  • Unlink your account: Settings → Telegram → Unlink. You can re-link anytime.
  • Disconnect an agent's bot: Agent Settings → Telegram → Disconnect (not available for Smithers)
  • Remove Telegram for everyone: Settings → Telegram → Remove Telegram for everyone. This disconnects all bots and unlinks all users.