Skip to content

Just a simple work with automatic email with Google API

Notifications You must be signed in to change notification settings

lucasAnacletoM/Automatic_email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic email

Just a simple work with automatic email with Google API

Status: Develooping

I'm working on README...please wait. :^)

THE PROJECT

This program send automatic emails to new applications in Google forms.

To make this work you need to make a Google spreadsheet linked to a forms that asks for the person's name and email.

HOW TO CONFIGURE

First you need to configure you google account to work with external applications:

  • Enable two-steps verification on your Google account
  • Add an app password to your mail and select the plataform you're using (In my case is Windows) and save the generated password

image

  • Put your email and App password in .env file

Now you need to enable Google APIs (Google Drive and Google Sheats)

  • Access console.cloud.google.com (just serch for Google developer console)
  • Click in APIs & Services > Enable APIs & Services.

image

  • Then click in creat project.
  • Name your project and change the location if you want.
  • Click in OK.
  • Now in OAuth 2.0 Client IDs click in
  • In the serch bar serch for Google drive api
  • select the first result

image

  • Enable it.
  • Click in navigation menu in top-left
  • Click in APIs & Service > OAuth consent screen.
  • In User Type select External and crate

image

  • Insert a App name and put your email for suport and contact (logo and others things are not mandatory)
  • In Scopes just click in Save and Continue.
  • In Test User add if you want. In my case I didn't use.
  • Check the summary and click in Back to Dashboard.
  • Now go to Credentials in side bar.
  • Create Credentials > OAuth client ID.
  • Aplication Type: Desktop app.
  • And name your OAuth 2.0 client.
  • In OAuth 2.0 Client IDs click in Download OAuth client.
  • Download JSON
  • Place the JSON file in the same project folder
  • rename the downloaded JSON to key.json (if you change the in the code, you can rename to the name you want!)
  • To install the Google client library for Python, run the following command in terminal:
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
  • After that, you need to put the spreadsheet ID in the .env file.
  • To take your spreadsheet ID, go to the URL of the spreadsheet and take the code located on the pink spot in the next image:

image

  • Then in the .env file put your Google account to send emails and the App password.
  • Done!

THINGS TO KNOW

This program need to be running all the time in the machine. If someone send a new application in Google Forms and the program is off, this person will never recive the confirmation email. (I'm working to fix that.)

Any questions or suggestions, please send me a message!

About

Just a simple work with automatic email with Google API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published