Automate your workflow
Your AI tools are connected to Gmail, Calendar, and Google Docs. Now let's put them to work — read an email, create a calendar event from it, and write a summary doc. All without opening your browser.
Read and extract from email
First, let's get AI to read an email and pull out the key information.
- Gemini CLI + Voice
- Direct gws Commands
Make sure Gemini CLI is running in your terminal. Then say (with Wispr Flow) or type:
Check my Gmail for the most recent email about an invoice or payment. Summarise what it says, who sent it, and what action is needed.
Gemini CLI will use the Gmail tools to fetch your emails, find the relevant message, and give you a structured summary.
Gemini asks for permission? If Gemini CLI asks to approve a tool call, type y and press Enter.
If you prefer to use gws directly, start by triaging your inbox:
gws gmail +triage
This shows your recent emails with IDs. To read a specific message, use:
gws gmail +read --id MESSAGE_ID
Replace MESSAGE_ID with the ID from the triage list. This displays the full email content in your terminal.
You should see something like this:
From: Alex Kim ([email protected])
Subject: Invoice #4821 — follow-up needed by Friday
Summary: Alex is asking you to review invoice #4821 from the design contractor. The amount is $2,400. He needs your approval before Friday so finance can process the payment before month-end.
Action needed: Review and approve invoice #4821 by Friday.
Replace "invoice" with any topic relevant to you. Try "meeting", "project update", "deadline", or a specific person's name. The prompt works the same way — AI will find and summarise the most relevant email.
Create a calendar event from the email
Now let's turn that email into a calendar event — a follow-up reminder so you don't forget.
- Gemini CLI + Voice
- Direct gws Commands
Say or type:
Based on that email, create a Google Calendar event for Thursday at 2 PM called "Follow up: Invoice review". Set it for 30 minutes.
Gemini CLI will create the event on your Google Calendar. You should see a confirmation with the event details.
gws calendar +insert --summary "Follow up: Invoice review" --start "2026-03-26T14:00:00" --end "2026-03-26T14:30:00"
This creates a 30-minute event on Thursday at 2 PM. Adjust the date and time to suit your needs.
You should see a confirmation like:
Event created: "Follow up: Invoice review"
When: Thursday, 26 March 2026, 2:00 PM - 2:30 PM
Calendar: Primary
You just went from reading an email to scheduling a follow-up — without opening your browser. The AI understood the context from the email and created the event for you. This is what cross-app workflows look like.
Write a summary to Google Docs
Next, let's capture the important details in a Google Doc — so you have a written record.
- Gemini CLI + Voice
- Direct gws Commands
Say or type:
Create a new Google Doc called "Invoice Follow-up Notes" and write a summary of that email in it, including the key details and next steps.
Gemini CLI will create a new document in your Google Drive and write the summary into it.
First, create the document:
gws docs +create --title "Invoice Follow-up Notes"
Then write content to it:
gws docs +write --title "Invoice Follow-up Notes" --body "Invoice #4821 from design contractor. Amount: $2,400. Requested by Alex Kim. Action: Review and approve by Friday for month-end processing."
You should see a confirmation like:
Document created: "Invoice Follow-up Notes"
Content written: Summary of invoice email with key details and next steps.
Location: Google Drive (My Drive)
The document appears in your Google Drive. Open drive.google.com and you'll find "Invoice Follow-up Notes" in your recent files. You can share it, edit it, or add to it later.
Upload a file to Google Drive (bonus)
You can also upload files from your computer to Google Drive — useful for attaching reports or documents to your workflow.
- Gemini CLI + Voice
- Direct gws Commands
Say or type:
Upload the file report.pdf from my current folder to Google Drive.
Gemini CLI will upload the file and confirm when it's done.
gws drive +upload ./report.pdf --name "Q1 Report"
This uploads report.pdf from your current folder to Google Drive with the name "Q1 Report".
No file to upload? That's fine — skip this step. It's here to show you what's possible. You can always come back and try it later with any file on your computer.
The complete workflow in one prompt
Here's where it all comes together. Instead of doing each step separately, give AI one instruction that triggers actions across three Google apps:
- Gemini CLI + Voice
- Direct gws Commands
Say or type:
Read my most recent email about the project deadline. Create a calendar event for the follow-up. Write a summary into a new Google Doc. Tell me when everything is done.
Gemini CLI will read the email, create the calendar event, write the doc, and report back — all from one prompt.
With direct commands, you would need to run each step separately:
gws gmail +triage
gws calendar +insert --summary "Project deadline follow-up" --start "2026-03-27T10:00:00" --end "2026-03-27T10:30:00"
gws docs +create --title "Project Deadline Notes"
This is why Gemini CLI is so powerful — it chains these steps together automatically from a single natural language instruction.
This is the real power — one natural language instruction triggers actions across three Google apps. You didn't write code. You didn't open any websites. You told AI what you needed, and it handled Gmail, Calendar, and Docs for you.
What just happened?
Let's recap what you did:
- Read an email — AI fetched it from Gmail and extracted the key details
- Created a calendar event — a follow-up reminder based on the email content
- Wrote a Google Doc — a summary with next steps for your records
- Uploaded a file to Google Drive (bonus step)
- Combined all three actions into a single natural language prompt
The key insight: AI can bridge multiple apps that normally require separate logins, separate tabs, and separate workflows. One instruction replaces five minutes of clicking between apps.
Troubleshooting
Calendar event not created
Make sure your Google Calendar access is authorised. Run gws calendar +agenda to check — if it shows your events, the connection is working. If not, run gws auth login -s gmail,calendar,drive,docs,sheets to re-authorise. Also check that you gave Gemini CLI permission when it asked (type y and press Enter).
Google Doc not found
The document is created in your Google Drive. Open drive.google.com and search for the document title. If it's not there, the Docs API may not be enabled — run gws auth setup to check and enable all required APIs.
Permission errors
Your Google authorisation may have expired or may not include all the required scopes. Exit Gemini CLI and run:
gws auth login -s gmail,calendar,drive,docs,sheets
Make sure to select all permission checkboxes when the browser window opens. Then restart Gemini CLI.
Gemini can't find the email
Try being more specific in your prompt. Instead of "the most recent email about an invoice", try "the email from Alex about invoice 4821" or "emails from this week with the word invoice in the subject line". If your inbox is empty or has no matching emails, Gemini will tell you — try a different topic.
The AI only does one action instead of all three
Some prompts may be too complex for a single pass. Break it into two prompts: first ask AI to read and summarise the email, then ask it to create the calendar event and write the doc based on that summary. This gives AI clearer context for each step.
My voice input has errors
Wispr Flow may occasionally mishear technical terms or proper nouns. You can review and correct the text in Gemini CLI before pressing Enter. If voice input is causing too many errors, switch to typing or pasting prompts instead.
Nice work — you've built a cross-app workflow that turns emails into real actions. Head to Keep going for daily habit ideas and more advanced prompts.