Skip to content

Mte90/vikunja-telegram-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vikunja Telegram Bot πŸ€–

A lightweight Telegram bot to create and manage Vikunja tasks using quick syntax or guided UI.

Features

  • πŸ” Quick task creation via Telegram
  • 🧠 Smart parsing (*label, +project, !priority, tomorrow)
  • πŸ“† View and edit tasks, labels, and due dates
  • πŸ‘₯ Multi-user support with per-chat authentication
  • ⚑ Auto-create tasks from plain messages
  • βœ… Quick task completion with inline buttons
  • πŸ› οΈ Minimal deployment using Python + Telegram + requests

Setup

  1. Clone the repo
  2. Create a .env file with your credentials:
    TELEGRAM_TOKEN=your_telegram_token
    VIKUNJA_API=http://your-vikunja-url/api/v1
  3. Install dependencies:
    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    
  4. Run the bot: python vikunja_bot.py

Usage

Multi-User Authentication

The bot now supports multiple users! Each user can authenticate with their own Vikunja credentials:

  1. Start a conversation with the bot: /start
  2. Log in with your credentials: /login
  3. Enter your Vikunja username when prompted
  4. Enter your Vikunja password when prompted (the message will be deleted for security)
  5. Use the bot commands: /tasks, /today, /status
  6. Log out when done: /logout

Commands

  • /start - Welcome message and command list
  • /login - Authenticate with your Vikunja credentials
  • /logout - Log out from your account
  • /tasks - View, edit, or complete your active tasks
  • /today - Show all tasks due today
  • /status - Check Vikunja API connection status

Quick Task Creation

Simply send any message (without a command) to automatically create a task! After creating the task, the bot will show you a list of your active tasks with quick action buttons.

Examples:

  • Buy groceries tomorrow - Creates a task with a due date
  • Finish report !5 - Creates a high priority task (priority 5)
  • Call John +Work - Creates a task in the "Work" project

Quick Actions: After creating a task, you'll see inline buttons to quickly mark tasks as done without entering any commands. Just tap "βœ… Mark #1 Done" to complete a task instantly!

Credential Storage

Your credentials are securely saved to a local file (user_credentials.json) when you log in. This allows:

  • Automatic re-authentication when the bot restarts
  • Persistent sessions across bot restarts
  • No need to log in every time you use the bot

The credentials file is protected with restrictive permissions (600 - owner read/write only).

Security Note: Credentials are stored in plain text in the JSON file. Ensure the bot runs in a secure environment and the credentials file is not accessible to unauthorized users.

To remove your saved credentials, use the /logout command.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%