Amir Orfi

Generation

generate functionMon, 16 Jan 2023

Trad Google mail Andy sabe it ton Google sheet

def sendToGSheet(subject, content): import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'] credentials = ServiceAccountCredentials.from_json_keyfile_name('/content/gspread-275812-baf8a05c34ab.json', scope) gc = gspread.authorize(credentials) wks = gc.open("GoogleMail").sheet1 wks.append_row([subject, content])

Questions about programming?Chat with your personal AI assistant