Git Product home page Git Product logo

gmailnotifier's Introduction

๐Ÿ“ฉ Gmail Notifier

Gmail Notifier is a python application script that monitors your Gmail Inbox using the Gmail API for any new emails. The user recieves a desktop notification each time there is a new email sent.

Here is a snapshot of what the notification might look like! altText

๐Ÿ“Œ Set up

  1. Use the Use this template commpand to create a repository with the source code.
  2. Create a virtual environement env from the command python3 -m venv env in the folder where you want to create the project.
  3. Clone the source code in the into your project folder.
  4. Install the following python libraries
    • pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
  5. Enable the Gmail API and create the ncessary credentials.
    • Go to the Google Developor Console and create a new project. Include the Project ID in the PROJECT_ID environment variable in the .env file.
    • Enable the Gmail API for the project through the API Console for the project.
    • From the Credentials tab in the API Console, create a OAuth 2.0 Client ID and a Service Account
    • Select the Edit Oauth Client ID button in the OAuth Client ID actions and select Download JSON. Rename this file to credentials.json and upload it to the utils folder in your project root. Ensure that the location for the credentials is consistent in the .env file.
    • Using the Edit action for the service account, create a key by navigating to the Keys tab and selecting the approporate options. Download the key as a .Json file. Rename the file to serviceCredentials.json and upload it to the utils folder at project root.
  6. Enable the Google Pub/Sub messaging service. The python program uses Google Pub/Sub as a messaging tool.
    • Create a Pub/Sub Topic using the Create Topic tab within the same project created in the previous step.
    • To create a Pub/Sub scubscription navigate to the Topics tab and select the topic created in the previous step.
    • Navigate the Subscriptions tab and select Create Subscription. Select the approporate options neccesary.
    • Add the service account created prior as a Pub/Sub Subscriber using the Add Principal section in the Permissions tab.
  7. cd into the folder where the main.py file is located. Use the:memo: command in the terminal to start the script.

๐Ÿ“ TODO

  1. Include support for scheduling. Create a configuration file which records the _HistoryID neccesary to poll the Pub/Sub client.
  2. Provide Support for programmatically replying to emails.

License

This project is licensed under the Mozilla Public License 2.0

gmailnotifier's People

Contributors

pratyushmakkar avatar

Stargazers

Herbert Lu avatar Jonathan Lyashko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.