You need to send your research group a "revision round 3" status update with the updated deadline. Before you automate that send, what should happen first?
search_emails from Day 5 showed me how to read — but sending feels different. A misformatted email to my journal editor would be embarrassing at minimum. I'd want to review it first.
That instinct is the right one. GMAIL_CREATE_EMAIL_DRAFT saves the email to your Drafts folder without delivering it. You can open Gmail, review the wording, edit the recipient if needed, then send manually — or automate the send on Day 7 after you've confirmed the draft looks right.
How do I see the draft I created? Does it appear immediately in Gmail?
Yes — open Gmail, click Drafts. It's there. Any draft created by GMAIL_CREATE_EMAIL_DRAFT is a real draft in your account. You can edit it in the browser, forward it, or delete it. The response dict includes the draft ID so you can reference it later:
def draft_email(to: str, subject: str, body: str) -> dict:
result = toolset.execute_action(
Action.GMAIL_CREATE_EMAIL_DRAFT,
{"to": to, "subject": subject, "body": body}
)
print(f"Draft created: {result.get('id', 'unknown')}")
return resultSo I can automate the draft composition — subject line with the revision round number, body with the updated deadline — and just review it in Gmail before sending. The boring parts are automated, the judgment call stays with me.
The revision cover letter, generated in seconds. Your job is verifying that "Dr. Smith" is spelled correctly.
I've drafted that email manually eight times this year. Now it's one function call away from being pre-populated with the right fields.
The test-first pattern applies to every write action:
# Test with yourself first
result = draft_email("myemail@uni.ac.uk", "Test", "Draft content")
print(result)One mis-sent email to a journal editor is a career memory. The draft step is your confirmation checkpoint.
GMAIL_CREATE_EMAIL_DRAFT is a safe write action — it creates the email in your Drafts folder with no delivery.
GMAIL_SEND_EMAIL is irreversible — the message is delivered immediately. No undo.
{"id": "draft_xyz", "message": {...}}The id is the draft's Gmail ID. Keep it if you want to send the draft programmatically later.
You need to send your research group a "revision round 3" status update with the updated deadline. Before you automate that send, what should happen first?
search_emails from Day 5 showed me how to read — but sending feels different. A misformatted email to my journal editor would be embarrassing at minimum. I'd want to review it first.
That instinct is the right one. GMAIL_CREATE_EMAIL_DRAFT saves the email to your Drafts folder without delivering it. You can open Gmail, review the wording, edit the recipient if needed, then send manually — or automate the send on Day 7 after you've confirmed the draft looks right.
How do I see the draft I created? Does it appear immediately in Gmail?
Yes — open Gmail, click Drafts. It's there. Any draft created by GMAIL_CREATE_EMAIL_DRAFT is a real draft in your account. You can edit it in the browser, forward it, or delete it. The response dict includes the draft ID so you can reference it later:
def draft_email(to: str, subject: str, body: str) -> dict:
result = toolset.execute_action(
Action.GMAIL_CREATE_EMAIL_DRAFT,
{"to": to, "subject": subject, "body": body}
)
print(f"Draft created: {result.get('id', 'unknown')}")
return resultSo I can automate the draft composition — subject line with the revision round number, body with the updated deadline — and just review it in Gmail before sending. The boring parts are automated, the judgment call stays with me.
The revision cover letter, generated in seconds. Your job is verifying that "Dr. Smith" is spelled correctly.
I've drafted that email manually eight times this year. Now it's one function call away from being pre-populated with the right fields.
The test-first pattern applies to every write action:
# Test with yourself first
result = draft_email("myemail@uni.ac.uk", "Test", "Draft content")
print(result)One mis-sent email to a journal editor is a career memory. The draft step is your confirmation checkpoint.
GMAIL_CREATE_EMAIL_DRAFT is a safe write action — it creates the email in your Drafts folder with no delivery.
GMAIL_SEND_EMAIL is irreversible — the message is delivered immediately. No undo.
{"id": "draft_xyz", "message": {...}}The id is the draft's Gmail ID. Keep it if you want to send the draft programmatically later.
Create a free account to get started. Paid plans unlock all tracks.