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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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