Skip to main content

A bot that connects Telegram with Gmail

Project description

Python Gmail Summary Bot

PyPI version

A bot to summarize your Gmail emails using the Gmail API and send summaries to Telegram.

Features

  • Summarizes Gmail emails.
  • Sends email summaries to a specified Telegram chat.

Installation

You can install the package via pip:

pip install telegram-gmail-bot

Setup

Creating credentials for accessing Google APIs

Step 1: Create a Service Account

  1. Go to the Google Cloud Console: Google Cloud Console.
  2. Select your project or create a new one.
  3. Search for APIs & Services in the search bar.
  4. Click on Credentials in the left sidebar.
  5. Click on Create Credentials and select OAuth client ID.
  6. Select Desktop app as the application type.
  7. Add the generated credentials as environment variables in your project.

Step 2: Enable the Gmail API

  1. Go to the API & Services page: API & Services.
  2. Enable the Gmail API:
    • Click on "Enable APIs and Services".
    • Search for "Gmail API" and enable it for your project.

Local Usage

  1. Copy the example environment file and fill in your credentials:

    cp .env.example .env
    
  2. Create a virtual environment and install dependencies:

    python3 -m venv .
    source venv/bin/activate
    pip install -r requirements.txt
    
  3. Run the bot:

    python main.py
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telegram_gmail_bot-0.1.16.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

telegram_gmail_bot-0.1.16-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file telegram_gmail_bot-0.1.16.tar.gz.

File metadata

  • Download URL: telegram_gmail_bot-0.1.16.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for telegram_gmail_bot-0.1.16.tar.gz
Algorithm Hash digest
SHA256 4acd2f52b4280612c573c34d303655af87c765389e57a0ed6099cb134549c2a1
MD5 559361424d8d07d304be45164db852e2
BLAKE2b-256 f91453b99ad31aeaf963a0328800d16320a237227d1624bffe67cc5ace39370e

See more details on using hashes here.

File details

Details for the file telegram_gmail_bot-0.1.16-py3-none-any.whl.

File metadata

File hashes

Hashes for telegram_gmail_bot-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 607bd0a13f51e2f77be0990f8af5067570f3bef5493bc35a8af1f9b003be70bb
MD5 77d04cb86d5c00c61694b2ba03c5fb28
BLAKE2b-256 6702042d25cfa10916dec29b0c30e685b067081692b2e3b79231f884579aeb0d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page