Path: blob/master/Gmail/Gmail_Create_draft_email.ipynb
2973 views
Gmail - Create draft email
Tags: #gmail #email #draft #create #python #library
Author: Sriniketh Jayasendil
Last update: 2023-05-19 (Created: 2023-05-16)
Description: This notebook will show how to create a draft email using the Gmail API. It is usefull for organizations that need to automate the creation of emails.
Input
Import libraries
Setup Variables
client_secret_file
: This variable stores the file path to the client secret file for Gmail API authentication.api_name
: This variable stores the name or identifier of the Gmail API.api_version
: This variable stores the version of the Gmail API.scopes
: This variable stores the required scopes for accessing Gmail API.email_from
: This variable stores the email address of the sender.email_to
: This variable stores the email addresses of the recipients.email_cc
: This variable stores the email addresses of the CC recipients.email_subject
: This variable stores the subject of the email.email_body
: This variable stores the body or content of the email.
For more information on how to setup the credentials, please refer to the Gmail API Python Quickstart.
Model
Connect to service
Output
Create draft email
This function will create a draft email using the Gmail API.