Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/31/2021, 11:15 AM
Email in python app engine using sendgrid
Establish sendgrid account
A verified sender account has to be established
Single Sender Verification
Verify ownership of a single email address to use as a sender. Learn more
Verify a Single Sender
STATUS
DOMAIN
Verified
jiacovacci@hotmail.com
I used my hotmail address and now I send all emails from this account
I used WEB API to send emails
Need to generate api key to send from app engine
In code below I hard coded my API key in main.py
https://docs.sendgrid.com/ui/account-and-settings/api-keys#creating-an-api-key
Using this program format you should now be able to loop thru your
client file and send translated emails to each client
https://docs.sendgrid.com/ui/account-and-settings/api-keys#storing-an-api-key-in-an-environment-variable
https://docs.sendgrid.com/for-developers/sending-email/quickstart-python
https://docs.sendgrid.com/for-developers/sending-email/api-getting-started
https://cloud.google.com/community/tutorials/send-email-with-sendgrid-and-nodejs-on-google-app-engine
https://cloud.google.com/appengine/docs/standard/python3/sending-messages
https://docs.sendgrid.com/ui/account-and-settings/api-keys#storing-an-api-key-in-an-environment-variable
https://github.com/sendgrid/sendgrid-python
https://docs.sendgrid.com/for-developers
requirements.txt
Flask==1.1.1
PyYAML>=4.2b1
python-http-client>=3.2.1
six==1.11.0
pytest==3.8.2
starkbank-ecdsa>=1.0.0
sendgrid==v6.0.0
app.yaml
runtime: python37
main.py
import sendgrid
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
from sendgrid.helpers.mail import Mail, Email, To, Content
from flask import Flask, request, render_template
# Imports the Google Cloud client library
# If `entrypoint` is not defined in app.yaml, App Engine will look for an app
# called `app` in `main.py`.
app = Flask(__name__)
@app.route('/', methods=['POST','GET']) # This defines when
the function below will be called
def run_quickstart():
if request.method == 'POST':
data = request.form.to_dict(flat=True)
Comments = data['mycomments'] # Sends data to the form
sg = sendgrid.SendGridAPIClient('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')
from_email = Email("jiacovacci@hotmail.com") # Change to your
verified sender
to_email = To("john.iacovacci1@gmail.com") # Change to your recipient
subject = "Did this work?"
content = Content("text/plain", Comments)
mail = Mail(from_email, to_email, subject, content)
mail_json = mail.get()
# Send an HTTP POST request to /mail/send
response = sg.client.mail.send.post(request_body=mail_json)
print(response.status_code)
print(response.headers)
return render_template('comments.html', FormComments=Comments)
# Renders the page with the response
else:
# This code will run if a GET is received
return render_template('index.html')
if __name__ == "__main__":
# This is used when running locally only. When deploying to Google App
# Engine, a webserver process such as Gunicorn will serve the app. This
# can be configured by adding an `entrypoint` to app.yaml.
app.run(host="127.0.0.1", port=8080, debug=True)
templates
index.html
<!DOCTYPE html>
<html lang="en">
<body>
<h2>Input</h2>
<form method="post" action="/">
Comments: <textarea name="mycomments" rows="10" cols="30"> </textarea><br>
<button type="submit">Submit</button>
</form>
</body>
</html>
comments.html
<!doctype html>
<h2>Comments</h2>
<p>
{% if FormComments %}
{{ FormComments }}
{% else %}
Enter some text above.
{% endif %}
</p>
</html>
Saturday, July 31, 2021
Wednesday, July 28, 2021
Team Status updates due before meeting tomorrow, 7/28/2021, 6:50 PM, English, 7/28/2021, 6:50 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/28/2021, 6:50 PM
Team leaders - Please send status update sheets in before tomorrow's meeting
I'm focusing on using sendgrid from twilio
Was able to send email using shell script
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header 'Authorization: Bearer MY KEY' \
--header 'Content-Type: application/json' \
--data '{"personalizations":[{"to":[{"email":"john.iacovacci1@gmail.com","name":"John
Doe"}],"subject":"Hello, World!"}],"content": [{"type": "text/plain",
"value": "Heya!"}],"from":{"email":"jiacovacci@hotmail.com","name":"Sam
Smith"},"reply_to":{"email":"jiacovacci@hotmail.com","name":"Sam
Smith"}}'
And python script
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
message = Mail(
from_email='jiacovacci@hotmail.com',
to_emails='john.iacovacci1@gmail.com',
subject='Sending with Twilio SendGrid is Fun',
html_content='<strong>and easy to do anywhere, even with Python</strong>')
try:
sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
response = sg.send(message)
print(response.status_code)
print(response.body)
print(response.headers)
except Exception as e:
print(e.message)
https://docs.sendgrid.com/ui/account-and-settings/api-keys#storing-an-api-key-in-an-environment-variable
https://docs.sendgrid.com/for-developers/sending-email/quickstart-python
Working on app engine
Will try node first before python
https://cloud.google.com/community/tutorials/send-email-with-sendgrid-and-nodejs-on-google-app-engine
Classroom blog: googleclouduconn.blogspot.com
7/28/2021, 6:50 PM
Team leaders - Please send status update sheets in before tomorrow's meeting
I'm focusing on using sendgrid from twilio
Was able to send email using shell script
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header 'Authorization: Bearer MY KEY' \
--header 'Content-Type: application/json' \
--data '{"personalizations":[{"to":[{"email":"john.iacovacci1@gmail.com","name":"John
Doe"}],"subject":"Hello, World!"}],"content": [{"type": "text/plain",
"value": "Heya!"}],"from":{"email":"jiacovacci@hotmail.com","name":"Sam
Smith"},"reply_to":{"email":"jiacovacci@hotmail.com","name":"Sam
Smith"}}'
And python script
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
message = Mail(
from_email='jiacovacci@hotmail.com',
to_emails='john.iacovacci1@gmail.com',
subject='Sending with Twilio SendGrid is Fun',
html_content='<strong>and easy to do anywhere, even with Python</strong>')
try:
sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
response = sg.send(message)
print(response.status_code)
print(response.body)
print(response.headers)
except Exception as e:
print(e.message)
https://docs.sendgrid.com/ui/account-and-settings/api-keys#storing-an-api-key-in-an-environment-variable
https://docs.sendgrid.com/for-developers/sending-email/quickstart-python
Working on app engine
Will try node first before python
https://cloud.google.com/community/tutorials/send-email-with-sendgrid-and-nodejs-on-google-app-engine
Monday, July 26, 2021
gmail api for app engine, 7/26/2021, 9:57 PM, English, 7/26/2021, 9:57 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/26/2021, 9:57 PM
GMAIL API for App Engine Python
The App Engine Python GMAIL API is very challenging
https://cloud.google.com/appengine/docs/standard/python/mail
I've been working on trying to get some examples built
May have to use 3rd party services
https://docs.sendgrid.com/for-developers/sending-email/api-getting-started
I'd still like all the teams to work on this
Please make sure you update the status even if you are not successful
I need to understand where each team is
Classroom blog: googleclouduconn.blogspot.com
7/26/2021, 9:57 PM
GMAIL API for App Engine Python
The App Engine Python GMAIL API is very challenging
https://cloud.google.com/appengine/docs/standard/python/mail
I've been working on trying to get some examples built
May have to use 3rd party services
https://docs.sendgrid.com/for-developers/sending-email/api-getting-started
I'd still like all the teams to work on this
Please make sure you update the status even if you are not successful
I need to understand where each team is
Thursday, July 22, 2021
Python Gmail API from Georgiy Zemlevskiy, 7/22/2021, 10:29 PM, English, 7/22/2021, 10:29 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/22/2021, 10:29 PM
Requirement number 2
New page needed to send text
send communications.
use text box and send button
When send is pushed
Message
Hello World
---> SEND←--
How do we loop thru all records in table?
Loop thru all records in the client table
E.G
Email: john.iacovacci1@gmail.com
Language: es
Translate Message
tmsg = customer['message'']
tlang = language field from datastore table
result = translate_client.translate(tmsg, target_language=tlang)
Need to use GMAIL API
https://developers.google.com/gmail/api/quickstart/python
Remember share project with team.
Put credentials in same path of python code
Copy up file from local download and rename to credentials.json
Credentials
Do your best to try to get this process running.
Following code is from Georgiy Zemlevskiy
Hello, following are the instructions to create a python program that
sends an email using the Gmail API.
Instructions:
1. Enable Gmail API.
2. Setup credentials. (guide here, but I didn't use it)
a. Click "Create Credentials", it should prompt you to create an
OAuth consent screen if you haven't already created credentials
before.
b. Follow the steps and configure it how you like.
c. Configure the scopes. For my example, you only need the "send
email" scope, which can be added by clicking the "Add or Remove
Scopes" button and adding "https://googleapis.com/auth/gmail.send".
d. Add test users. Add the emails of the people in your group
(including yourself), and whoever you want to test the app for you.
e. Verify that the information you entered is what correct.
f. Next, click the "Create Credentials" button again. Click OAuth
client ID, click "desktop application". Set a name, and click create!
To use this, download the secrets file by clicking the download icon.
You should put this in the directory with your app code, and rename it
to "credentials.json".
You are done with credentials setup!
3. Implement functionality.
a. Head over to the Gmail API quickstart. (I used python, but I
assume things will be similar with Java to a point.)
b. Follow the steps (install the client library, copy the code, etc.)
c. Run the file. ("python yourFileName.py" in the terminal)
d. If everything has been done correctly, a browser window/tab
should open with the OAuth consent screen. Follow the authentication
flow. Once completed, the terminal should show the labels of the
account you signed in with to the OAuth consent screen.
e. Next, duplicate the quickstart file, and remove the section
under "#Call the Gmail API".
f. Head over to the Gmail API documentation, specifically the
sending email page. Copy the create_message and send_message functions
to your new file.
g. There will be some errors. To remove them, add the following to
the imports at the top of your file:
from apiclient import errors
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import base64
At the end of the create_message function, replace the return
statement with this, which returns a message object (which is what we
need) rather than an encoded string:
return {'raw': base64.urlsafe_b64encode(message.as_string().encode()).decode()}
Also, at the end of the send_message function, wrap the content of the
print statements in parentheses like so:
print ('Message Id: %s' % message['id'])
...
print ('An error occurred: %s' % error)
h. Finally, add a statement that creates and sends the email, like
so (add the email you want to send to instead of
<recipientEmailHere>):
send_message(service, 'me', create_message('me',
'<recipientEmailHere>', 'test', 'test'))
If you did everything correctly, an email with the subject and content
of "test" should be sent to your recipient. If something is not
working, and you are stumped, feel free to use the code that I have
attached.
Note: while this process doesn't require more dependencies than I had
specified, if you want to continue to develop Google Cloud apps
locally, you need to download and install the Google Cloud SDK and
appropriate libraries/extensions for translation, datastore, app
engine (on the page with the Google Cloud SDK) etc.
Hope everything worked!
Georgiy Zemlevskiy.
Attachments area
ReplyForward
from __future__ import print_function
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
#Extra imports to fix errors(missing dependencies/imports)
from apiclient import errors
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import base64
#send scope - allows the program to send email on users' behalf
SCOPES = ['https://www.googleapis.com/auth/gmail.send']
#security/authorization stuff, dont modify unless you really know what
you're doing
def main():
creds = None
# The file token.json stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists('token.json'):
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
#desktopcredentials.json contains the secrets file for
the desktop OAuth client ID
#web credentials.json contains the secrets file for the
webapp OAuth client ID (DOESN'T WORK)
'desktopcredentials.json', SCOPES)
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.json', 'w') as token:
token.write(creds.to_json())
service = build('gmail', 'v1', credentials=creds)
#send email (had personal info so commented out. for test purposes
only. message and subject
# hardcoded, programmatically selected as they should(will be))
#send_message(service, 'me', create_message('me',
'<recipientEmailHere>', 'test', 'test'))
#function to create a message, copied from Gmail API docs, slightly
modified to fix errors
def create_message(sender, to, subject, message_text):
"""Create a message for an email.
Args:
sender: Email address of the sender.
to: Email address of the receiver.
subject: The subject of the email message.
message_text: The text of the email message.
Returns:
An object containing a base64url encoded email object.
"""
message = MIMEText(message_text)
message['to'] = to
message['from'] = sender
message['subject'] = subject
return {'raw':
base64.urlsafe_b64encode(message.as_string().encode()).decode()}
#function to send a created message, copied from Gmail API docs,
slightly modified to fix errors
def send_message(service, user_id, message):
"""Send an email message.
Args:
service: Authorized Gmail API service instance.
user_id: User's email address. The special value "me"
can be used to indicate the authenticated user.
message: Message to be sent.
Returns:
Sent Message.
"""
try:
message = (service.users().messages().send(userId=user_id, body=message)
.execute())
print ('Message Id: %s' % message['id'])
return message
except errors.HttpError as error:
print ('An error occurred: %s' % error)
if __name__ == '__main__':
main()
Classroom blog: googleclouduconn.blogspot.com
7/22/2021, 10:29 PM
Requirement number 2
New page needed to send text
send communications.
use text box and send button
When send is pushed
Message
Hello World
---> SEND←--
How do we loop thru all records in table?
Loop thru all records in the client table
E.G
Email: john.iacovacci1@gmail.com
Language: es
Translate Message
tmsg = customer['message'']
tlang = language field from datastore table
result = translate_client.translate(tmsg, target_language=tlang)
Need to use GMAIL API
https://developers.google.com/gmail/api/quickstart/python
Remember share project with team.
Put credentials in same path of python code
Copy up file from local download and rename to credentials.json
Credentials
Do your best to try to get this process running.
Following code is from Georgiy Zemlevskiy
Hello, following are the instructions to create a python program that
sends an email using the Gmail API.
Instructions:
1. Enable Gmail API.
2. Setup credentials. (guide here, but I didn't use it)
a. Click "Create Credentials", it should prompt you to create an
OAuth consent screen if you haven't already created credentials
before.
b. Follow the steps and configure it how you like.
c. Configure the scopes. For my example, you only need the "send
email" scope, which can be added by clicking the "Add or Remove
Scopes" button and adding "https://googleapis.com/auth/gmail.send".
d. Add test users. Add the emails of the people in your group
(including yourself), and whoever you want to test the app for you.
e. Verify that the information you entered is what correct.
f. Next, click the "Create Credentials" button again. Click OAuth
client ID, click "desktop application". Set a name, and click create!
To use this, download the secrets file by clicking the download icon.
You should put this in the directory with your app code, and rename it
to "credentials.json".
You are done with credentials setup!
3. Implement functionality.
a. Head over to the Gmail API quickstart. (I used python, but I
assume things will be similar with Java to a point.)
b. Follow the steps (install the client library, copy the code, etc.)
c. Run the file. ("python yourFileName.py" in the terminal)
d. If everything has been done correctly, a browser window/tab
should open with the OAuth consent screen. Follow the authentication
flow. Once completed, the terminal should show the labels of the
account you signed in with to the OAuth consent screen.
e. Next, duplicate the quickstart file, and remove the section
under "#Call the Gmail API".
f. Head over to the Gmail API documentation, specifically the
sending email page. Copy the create_message and send_message functions
to your new file.
g. There will be some errors. To remove them, add the following to
the imports at the top of your file:
from apiclient import errors
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import base64
At the end of the create_message function, replace the return
statement with this, which returns a message object (which is what we
need) rather than an encoded string:
return {'raw': base64.urlsafe_b64encode(message.as_string().encode()).decode()}
Also, at the end of the send_message function, wrap the content of the
print statements in parentheses like so:
print ('Message Id: %s' % message['id'])
...
print ('An error occurred: %s' % error)
h. Finally, add a statement that creates and sends the email, like
so (add the email you want to send to instead of
<recipientEmailHere>):
send_message(service, 'me', create_message('me',
'<recipientEmailHere>', 'test', 'test'))
If you did everything correctly, an email with the subject and content
of "test" should be sent to your recipient. If something is not
working, and you are stumped, feel free to use the code that I have
attached.
Note: while this process doesn't require more dependencies than I had
specified, if you want to continue to develop Google Cloud apps
locally, you need to download and install the Google Cloud SDK and
appropriate libraries/extensions for translation, datastore, app
engine (on the page with the Google Cloud SDK) etc.
Hope everything worked!
Georgiy Zemlevskiy.
Attachments area
ReplyForward
from __future__ import print_function
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
#Extra imports to fix errors(missing dependencies/imports)
from apiclient import errors
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import base64
#send scope - allows the program to send email on users' behalf
SCOPES = ['https://www.googleapis.com/auth/gmail.send']
#security/authorization stuff, dont modify unless you really know what
you're doing
def main():
creds = None
# The file token.json stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists('token.json'):
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
#desktopcredentials.json contains the secrets file for
the desktop OAuth client ID
#web credentials.json contains the secrets file for the
webapp OAuth client ID (DOESN'T WORK)
'desktopcredentials.json', SCOPES)
creds = flow.run_local_server(port=0)
# Save the credentials for the next run
with open('token.json', 'w') as token:
token.write(creds.to_json())
service = build('gmail', 'v1', credentials=creds)
#send email (had personal info so commented out. for test purposes
only. message and subject
# hardcoded, programmatically selected as they should(will be))
#send_message(service, 'me', create_message('me',
'<recipientEmailHere>', 'test', 'test'))
#function to create a message, copied from Gmail API docs, slightly
modified to fix errors
def create_message(sender, to, subject, message_text):
"""Create a message for an email.
Args:
sender: Email address of the sender.
to: Email address of the receiver.
subject: The subject of the email message.
message_text: The text of the email message.
Returns:
An object containing a base64url encoded email object.
"""
message = MIMEText(message_text)
message['to'] = to
message['from'] = sender
message['subject'] = subject
return {'raw':
base64.urlsafe_b64encode(message.as_string().encode()).decode()}
#function to send a created message, copied from Gmail API docs,
slightly modified to fix errors
def send_message(service, user_id, message):
"""Send an email message.
Args:
service: Authorized Gmail API service instance.
user_id: User's email address. The special value "me"
can be used to indicate the authenticated user.
message: Message to be sent.
Returns:
Sent Message.
"""
try:
message = (service.users().messages().send(userId=user_id, body=message)
.execute())
print ('Message Id: %s' % message['id'])
return message
except errors.HttpError as error:
print ('An error occurred: %s' % error)
if __name__ == '__main__':
main()
Tuesday, July 20, 2021
Requirement 2, 7/20/2021, 5:21 PM, English, 7/20/2021, 5:22 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/20/2021, 5:21 PM
Requirement number 2
New page needed to send text
send communications.
use text box and send button
When send is pushed
Message
Hello World
---> SEND←--
Loop thru all records in the client table
E.G
Email: john.iacovacci1@gmail.com
Language: es
Translate Message
tinst = customer['instructions']
tlang = language field from datastore table
result = translate_client.translate(tinst, target_language=tlang)
Need to use GMAIL API
https://developers.google.com/gmail/api/quickstart/python
Remember share project with team.
Do you best to try to get this process running.
It will require establishing oauth credentials
User Authentication with OAuth 2.0
The OAuth 2.0 specification defines a delegation protocol that is
useful for conveying authorization decisions across a network of
web-enabled applications and APIs. OAuth is used in a wide variety of
applications, including providing mechanisms for user authentication.
Communication process system
Build an app engine process to input the following fields into an HTML form
Textbox
Send-button
When the send button is hit
Loop thru table to find client records that match class
If record is matched check the language field to see if it needs translation'
If language is not english
Send language and text to translate API
Check to see if delivery text or email
If email send translated (if needed) textbox to email on record
https://uconnstamfordslp.blogspot.com/p/app-engine-flask-html-form.html
(not complete)
Please note texting may require additional work then emailing.
For better success separate out both with small POC programs.
Classroom blog: googleclouduconn.blogspot.com
7/20/2021, 5:21 PM
Requirement number 2
New page needed to send text
send communications.
use text box and send button
When send is pushed
Message
Hello World
---> SEND←--
Loop thru all records in the client table
E.G
Email: john.iacovacci1@gmail.com
Language: es
Translate Message
tinst = customer['instructions']
tlang = language field from datastore table
result = translate_client.translate(tinst, target_language=tlang)
Need to use GMAIL API
https://developers.google.com/gmail/api/quickstart/python
Remember share project with team.
Do you best to try to get this process running.
It will require establishing oauth credentials
User Authentication with OAuth 2.0
The OAuth 2.0 specification defines a delegation protocol that is
useful for conveying authorization decisions across a network of
web-enabled applications and APIs. OAuth is used in a wide variety of
applications, including providing mechanisms for user authentication.
Communication process system
Build an app engine process to input the following fields into an HTML form
Textbox
Send-button
When the send button is hit
Loop thru table to find client records that match class
If record is matched check the language field to see if it needs translation'
If language is not english
Send language and text to translate API
Check to see if delivery text or email
If email send translated (if needed) textbox to email on record
https://uconnstamfordslp.blogspot.com/p/app-engine-flask-html-form.html
(not complete)
Please note texting may require additional work then emailing.
For better success separate out both with small POC programs.
Thursday, July 15, 2021
Recorded WEBEX Sessions, 7/15/2021, 4:54 PM, English, 7/15/2021, 4:54 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/15/2021, 4:54 PM
Webex meeting recording: UCONN Google learning classes before project
work-20210701 2106-1
Recording link:
https://uconn-cmr.webex.com/uconn-cmr/ldr.php?RCID=de8a3a268c5941e38b323a49066b880d
Webex meeting recording: UCONN Google learning classes before project
work-20210629 2103-1
Recording link:
https://uconn-cmr.webex.com/uconn-cmr/ldr.php?RCID=68528ee8c92747af8c0deb1fc63f1e2e
Webex meeting recording: UCONN Google learning classes before project
work-20210624 2115-1
Recording link:
https://uconn-cmr.webex.com/uconn-cmr/ldr.php?RCID=f8ae2847b130459ebeee535eb0752853
Classroom blog: googleclouduconn.blogspot.com
7/15/2021, 4:54 PM
Webex meeting recording: UCONN Google learning classes before project
work-20210701 2106-1
Recording link:
https://uconn-cmr.webex.com/uconn-cmr/ldr.php?RCID=de8a3a268c5941e38b323a49066b880d
Webex meeting recording: UCONN Google learning classes before project
work-20210629 2103-1
Recording link:
https://uconn-cmr.webex.com/uconn-cmr/ldr.php?RCID=68528ee8c92747af8c0deb1fc63f1e2e
Webex meeting recording: UCONN Google learning classes before project
work-20210624 2115-1
Recording link:
https://uconn-cmr.webex.com/uconn-cmr/ldr.php?RCID=f8ae2847b130459ebeee535eb0752853
Weekly Status update meeting link, 7/15/2021, 10:50 AM, English, 7/15/2021, 10:50 AM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/15/2021, 10:50 AM
Weekly Status Update Link
https://uconn-cmr.webex.com/uconn-cmr/j.php?MTID=m5ae15524804910dfb9f70866923795ed
Password:
uconn
Host key:
981420
Agenda:
Weekly team status report out. Each team should update spreadsheet and
prepare to review progress during meeting
Classroom blog: googleclouduconn.blogspot.com
7/15/2021, 10:50 AM
Weekly Status Update Link
https://uconn-cmr.webex.com/uconn-cmr/j.php?MTID=m5ae15524804910dfb9f70866923795ed
Password:
uconn
Host key:
981420
Agenda:
Weekly team status report out. Each team should update spreadsheet and
prepare to review progress during meeting
Tuesday, July 13, 2021
Agenda for Weekly meeting on 7/15/2021, 7/13/2021, 7:16 PM, English, 7/13/2021, 7:16 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/13/2021, 7:16 PM
Agenda for Weekly meeting on 7/15/2021
I need a representative from each team to attend but all are welcome to attend.
Please fill our status reports on work done so far and have questions ready.
Each team will need to provide and update as to where they are in the project.
Please don't hesitate to reach out with questions or issues.
john.iacovacci1@gmail.com
Classroom blog: googleclouduconn.blogspot.com
7/13/2021, 7:16 PM
Agenda for Weekly meeting on 7/15/2021
I need a representative from each team to attend but all are welcome to attend.
Please fill our status reports on work done so far and have questions ready.
Each team will need to provide and update as to where they are in the project.
Please don't hesitate to reach out with questions or issues.
john.iacovacci1@gmail.com
Sunday, July 11, 2021
GMAIL API, 7/12/2021, 0:54 AM, English, 7/12/2021, 0:54 AM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/12/2021, 0:54 AM
Gmail API
https://codelabs.developers.google.com/codelabs/intelligent-gmail-processing#0
Best way to learn is to keep trying and asking questions.
Above is another example of Gmail API
Classroom blog: googleclouduconn.blogspot.com
7/12/2021, 0:54 AM
Gmail API
https://codelabs.developers.google.com/codelabs/intelligent-gmail-processing#0
Best way to learn is to keep trying and asking questions.
Above is another example of Gmail API
Requirement # 2, 7/11/2021, 9:21 PM, English, 7/11/2021, 9:21 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/11/2021, 9:21 PM
Requirement number 2
The critical to path (most important functionality) is the ability to
send communications.
It is important to achieve a level of success with this functionality
and build from that point.
A simpler version of requirement 2 can use text box and send button
and only focus on email.
Looping thru all records in the table
Email: john.iacovacci1@gmail.com
Language: es
You can leverage the code from the CRUD translate example
from flask import Flask, request, render_template, redirect, send_from_directory
from google.cloud import translate_v2 as translate
translate_client = translate.Client()
# Imports the Google Cloud client library
from google.cloud import datastore
Text box would be tinst
tinst = customer['instructions']
tlang = language field from datastore table
result = translate_client.translate(tinst, target_language=tlang)
Can get all records and put in array or develop routine to read thru all records
Need to use GMAIL API
https://developers.google.com/gmail/api/quickstart/python
Remember share project with team.
Do you best to try to get this process running.
It will require establishing oauth credentials
User Authentication with OAuth 2.0
The OAuth 2.0 specification defines a delegation protocol that is
useful for conveying authorization decisions across a network of
web-enabled applications and APIs. OAuth is used in a wide variety of
applications, including providing mechanisms for user authentication.
Communication process system
Build an app engine process to input the following fields into an HTML form
Textbox
Class
Send-button
Verification (are you sure?)
date of event
Attachment
When the send button is hit
Loop thru table to find client records that match class
If record is matched check the language field to see if it needs translation'
If language is not english
Send language and text to translate API
Check to see if delivery text or email
If text send translated (if needed) textbox to number on record
If email send translated (if needed) textbox to email on record
https://uconnstamfordslp.blogspot.com/p/app-engine-flask-html-form.html
(not complete)
Please note texting may require additional work then emailing.
For better success separate out both with small POC programs.
Classroom blog: googleclouduconn.blogspot.com
7/11/2021, 9:21 PM
Requirement number 2
The critical to path (most important functionality) is the ability to
send communications.
It is important to achieve a level of success with this functionality
and build from that point.
A simpler version of requirement 2 can use text box and send button
and only focus on email.
Looping thru all records in the table
Email: john.iacovacci1@gmail.com
Language: es
You can leverage the code from the CRUD translate example
from flask import Flask, request, render_template, redirect, send_from_directory
from google.cloud import translate_v2 as translate
translate_client = translate.Client()
# Imports the Google Cloud client library
from google.cloud import datastore
Text box would be tinst
tinst = customer['instructions']
tlang = language field from datastore table
result = translate_client.translate(tinst, target_language=tlang)
Can get all records and put in array or develop routine to read thru all records
Need to use GMAIL API
https://developers.google.com/gmail/api/quickstart/python
Remember share project with team.
Do you best to try to get this process running.
It will require establishing oauth credentials
User Authentication with OAuth 2.0
The OAuth 2.0 specification defines a delegation protocol that is
useful for conveying authorization decisions across a network of
web-enabled applications and APIs. OAuth is used in a wide variety of
applications, including providing mechanisms for user authentication.
Communication process system
Build an app engine process to input the following fields into an HTML form
Textbox
Class
Send-button
Verification (are you sure?)
date of event
Attachment
When the send button is hit
Loop thru table to find client records that match class
If record is matched check the language field to see if it needs translation'
If language is not english
Send language and text to translate API
Check to see if delivery text or email
If text send translated (if needed) textbox to number on record
If email send translated (if needed) textbox to email on record
https://uconnstamfordslp.blogspot.com/p/app-engine-flask-html-form.html
(not complete)
Please note texting may require additional work then emailing.
For better success separate out both with small POC programs.
Saturday, July 3, 2021
Project Updates, 7/3/2021, 10:58 AM, English, 7/3/2021, 10:58 AM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/3/2021, 10:58 AM
Additional details
When building a new table (datastore kind) indtead custinfo use clientinfo
Key should be clientid instead of name
Properties should be added from 2 thru 6 from items below
Client Table
Client ID
Email
Cell phone
Language
Class
Preferred delivery: email, cell phone
Note language must match the the google translate language parameter
of the language you want to translate to e.g. es for spanish
Enter data for team members to test
CRUD program is built based on table above
Note: One project should be shared by team members as Project owners
Clarity for requirement 2 sent in different communication
Classroom blog: googleclouduconn.blogspot.com
7/3/2021, 10:58 AM
Additional details
When building a new table (datastore kind) indtead custinfo use clientinfo
Key should be clientid instead of name
Properties should be added from 2 thru 6 from items below
Client Table
Client ID
Cell phone
Language
Class
Preferred delivery: email, cell phone
Note language must match the the google translate language parameter
of the language you want to translate to e.g. es for spanish
Enter data for team members to test
CRUD program is built based on table above
Note: One project should be shared by team members as Project owners
Clarity for requirement 2 sent in different communication
Thursday, July 1, 2021
7/15 Status Updates Due, 7/1/2021, 7:03 PM, English, 7/1/2021, 7:04 PM
Your assigned language is: English
Classroom blog: googleclouduconn.blogspot.com
7/1/2021, 7:03 PM
Next meeting 7/15 5;00PM to 6:00PM
Status updates
Pick functionality on sheet 2 and move into sheet 1 to report out
J M Wright Status Update
https://docs.google.com/spreadsheets/d/1EHbO8dcBJJvMuAkiT83g2EVEzk_DT8HmfJgYBXB7evw/edit#gid=0
AITE Status Update
https://docs.google.com/spreadsheets/d/1iTZot4CvVQWhbagJSTy9SQUIHa6eQ11SIZrqJ7KVjQ4/edit#gid=0
Stamford High Status Update
https://docs.google.com/spreadsheets/d/1njlmjERHaaLE1RPIChgSHn9A9MTcaYdkTfScII8Zkfs/edit#gid=0
Westhill/Wilton STatus Update
https://docs.google.com/spreadsheets/d/1iMAy0hipcT769SSFB4XpPHnK0BTMP-_cwT5KKUVlfao/edit#gid=0
Westhill II Status Update
https://docs.google.com/spreadsheets/d/1x-teguBoLSQxN_IxxJZECkvse-9iZeo2HHRP7xdAR_w/edit#gid=0
Westhill I Status update
https://docs.google.com/spreadsheets/d/1d4QnuTl177WoiwZBjd-euSSi0oIJEEs9BQ-kCZ7xPSI/edit#gid=0
Classroom blog: googleclouduconn.blogspot.com
7/1/2021, 7:03 PM
Next meeting 7/15 5;00PM to 6:00PM
Status updates
Pick functionality on sheet 2 and move into sheet 1 to report out
J M Wright Status Update
https://docs.google.com/spreadsheets/d/1EHbO8dcBJJvMuAkiT83g2EVEzk_DT8HmfJgYBXB7evw/edit#gid=0
AITE Status Update
https://docs.google.com/spreadsheets/d/1iTZot4CvVQWhbagJSTy9SQUIHa6eQ11SIZrqJ7KVjQ4/edit#gid=0
Stamford High Status Update
https://docs.google.com/spreadsheets/d/1njlmjERHaaLE1RPIChgSHn9A9MTcaYdkTfScII8Zkfs/edit#gid=0
Westhill/Wilton STatus Update
https://docs.google.com/spreadsheets/d/1iMAy0hipcT769SSFB4XpPHnK0BTMP-_cwT5KKUVlfao/edit#gid=0
Westhill II Status Update
https://docs.google.com/spreadsheets/d/1x-teguBoLSQxN_IxxJZECkvse-9iZeo2HHRP7xdAR_w/edit#gid=0
Westhill I Status update
https://docs.google.com/spreadsheets/d/1d4QnuTl177WoiwZBjd-euSSi0oIJEEs9BQ-kCZ7xPSI/edit#gid=0
Subscribe to:
Posts (Atom)
Disable Billing
Search for Billing Manage billing accounts Go to MYPROJECTS CLICK ON THE 3 BUTTON Actions Then hit disable
-
Create a web site with main page of index.html and 2 other linked original content html pages At least 2 links to public web pages you di...
-
Assignment # 6 due 10/18/24 https://uconnstamfordslp.blogspot.com/p/assignment-exercise-python-datastore.html Recreate the app engine pr...
-
Your assigned language is: English Classroom blog: googleclouduconn.blogspot.com 8/31/2021, 8:08 PM Assignment 1 due 9/9/21 https...