{"id":28267,"library":"spreadsheetbot","title":"SpreadsheetBot","description":"A Python library to build Telegram bots where the bot logic and data are managed via Google Spreadsheets. Version 2.5.2, actively maintained. Targets Python >= 3.11. Release cadence: irregular.","status":"active","version":"2.5.2","language":"python","source_language":"en","source_url":"https://github.com/twobrowin-study/spreadsheetbot-lib","tags":["telegram","bot","google-sheets","spreadsheet","automation"],"install":[{"cmd":"pip install spreadsheetbot","lang":"bash","label":"Latest stable"}],"dependencies":[{"reason":"Telegram Bot API client","package":"python-telegram-bot","optional":false},{"reason":"Google API authentication","package":"google-auth","optional":false},{"reason":"Google Sheets API wrapper","package":"gspread","optional":false},{"reason":"Data manipulation","package":"pandas","optional":true}],"imports":[{"wrong":"from spreadsheetbot import SpreadsheetBot","symbol":"SpreadSheetBot","correct":"from spreadsheetbot import SpreadSheetBot"}],"quickstart":{"code":"from spreadsheetbot import SpreadsheetBot\nfrom spreadsheetbot import Config\n\n# Configure with your Google Sheets ID and credentials\nconfig = Config(\n    spreadsheet_id='1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms',\n    credentials_file='service_account.json'\n)\n\n# Create bot instance\nbot = SpreadsheetBot(config)\n\n# Start polling (uses Telegram bot token from environment TELEGRAM_BOT_TOKEN)\nbot.run()","lang":"python","description":"Minimal example to start a Telegram bot driven by a Google Spreadsheet. Requires TELEGRAM_BOT_TOKEN environment variable and a service account JSON file."},"warnings":[{"fix":"Use a separate spreadsheet for each bot instance, or manage data isolation manually.","message":"Do not reuse the same spreadsheet ID across multiple bot instances. The library assumes exclusive access for command registration and state management.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Upgrade code to use the new API: replace 'from spreadsheetbot import Bot' with 'from spreadsheetbot import SpreadsheetBot' and adjust method calls accordingly.","message":"Version 2.0.0 completely reworked the API. Old code using v1.x classes like 'Bot' and 'SheetManager' will not work. The main class is now 'SpreadsheetBot'.","severity":"breaking","affected_versions":"2.0.0+"},{"fix":"Share the spreadsheet with the service account email (found in the JSON credentials file) with 'Editor' role.","message":"Google service account credentials must have editor access to the spreadsheet. If the bot fails to write, check spreadsheet sharing settings.","severity":"gotcha","affected_versions":"all"},{"fix":"Set the environment variable TELEGRAM_BOT_TOKEN. Remove any direct token parameter from SpreadsheetBot constructor.","message":"Telegram bot token must be set via environment variable TELEGRAM_BOT_TOKEN. Previously, some examples passed it directly; that no longer works.","severity":"breaking","affected_versions":">=2.3.0"}],"env_vars":null,"search_vec":"'2.5.2':21 '3.11':26 'activ':22 'autom':36 'bot':8,11,31 'build':6 'cadenc':28 'data':14 'googl':18,33 'google-sheet':32 'irregular':29 'librari':4 'logic':12 'maintain':23 'manag':16 'python':3,25 'releas':27 'sheet':34 'spreadsheet':19,35 'spreadsheetbot':1 'target':24 'telegram':7,30 'version':20 'via':17","created_at":"2026-05-09T05:54:36.540118+00:00","updated_at":"2026-05-09T05:54:36.540118+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/twobrowin-study/spreadsheetbot-lib","docs":null,"changelog":null,"pypi":"https://pypi.org/project/spreadsheetbot/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["gcp","communication","data","workflow"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}