I\'m trying to automate the creation of drafts via the Gmail API, and I want these drafts to be responses to existing emails. To do this, I believe I need to set the \"threa
if you want to not only create the draft but also additionally send it then extension of above code (one additional line after draft =...create().execute():
draft = service.users().drafts().create(userId="me", body= message).execute()
message = service.users().drafts().send(userId='me', body={'id': draft['id']}).execute()