Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telegram.grayoffice

Telegram extension for Gray Office.

A bot that brings the Gray Office finance assistant into Telegram. Send it a question or a document; it forwards to the backend at POST <GRAYOFFICE_URL>/api/bots/ingest, which does the AI routing — free text is answered by the assistant, PDFs come back as structured JSON — and replies with the result.

Commands

  • /ping — check responsiveness.
  • /help — what the bot can do.
  • /ask <question> — query the finance assistant.
  • /login — connect your Gray Office account. The bot shows a code and a button to open Gray Office; once you enter the code there, the message updates itself to ✅ Connected automatically. Linked messages are tied to your account.
  • /whoami — show which Gray Office account is connected.
  • /logout — disconnect your Gray Office account.

Send a PDF invoice/receipt and it comes back as structured JSON (with the full result attached as a .json file). Send a .json document and it's validated locally, then summarised by the assistant. Unsupported or oversized files get a clear error prompt instead of failing silently.

Setup

  1. Talk to @BotFather, run /newbot, copy the token.

  2. Install dependencies:

    python -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
  3. Copy .env.example to .env and fill in:

    • TELEGRAM_BOT_TOKEN — from BotFather
    • GRAYOFFICE_URL — where grayoffice runs (default http://localhost:5173)
    • BOT_INGEST_TOKEN — must match BOT_INGEST_TOKEN in grayoffice's .dev.vars

Run

python bot.py

About

telegram extension for grayoffice

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages