✨Tutorial: How to Better Integrate Gemini with Gmail

A range of options, from basic to advanced, to leverage Gemini with Gmail.

[image created with Dall-E 3 via ChatGPT Plus]

Welcome to AutomatED: the newsletter on how to teach better with tech.

Each week, I share what I have learned — and am learning — about AI and tech in the university classroom. What works, what doesn't, and why.

In this fortnight’s Premium edition, I explain how to use Gemini — Google’s competitor to ChatGPT — in Google Workspace. Natively, there are a few options, but each leaves something to be desired, so I show you how you can take it to the next level.

I set out to write a comprehensive Tutorial on using Google’s Gemini for Workspace — previously called “Duet AI” (click this link if you have no clue what is going on at Google lately) — in Gmail and Slides to increase higher educators’ productivity.

If we could all save a few hours a week responding to student emails or producing presentations, that could really add up!

Originally, this Tutorial was slated to come out earlier this week, but then Google officially announced Gemini for Workspace for “teams of all sizes” on Wednesday, and I wanted to confirm that the relevant functionality did not change. Unfortunately, it didn’t, at least for now.

I ended up disappointed by Gemini in Slides, as it is limited to artistic image production, and it isn’t useful for most higher education users (who tend to need diagrams and flowcharts, which we have covered previously).

After much experimentation, here is the takeaway on Gmail: for most professors, learning specialists, and administrators, Gemini for Workspace in its native form in Gmail is not as useful as it will be in the future, as it is not yet sufficiently integrated with Docs and cannot learn from your past emails. However, as I explain, Gemini can be made more useful for Gmail by integrating Docs with Gmail.

If you receive a lot of emails that can be answered by your Docs — or by content you could place in your Docs — you will definitely want to read this.

💻 How Google’s AI Enhances Gmail Natively

There is one broad kind of task I am going to focus on here, mirroring our first Tutorial into using Microsoft 365 Copilot for Outlook.

My focus will be on showing how you can answer emails that could be answered by someone who has access to your documents — without giving them access, of course. These are emails that you receive that are answerable by your files, not your mind.

For instance, many of us professors receive questions from our students that are already answered by our syllabuses, and many of us receive requests from students to be caught up on lecture content after being absent from class that are addressable by our lesson plans.

👉 If you want to skip ahead to direct step-by-step instructions for how to do this with Gemini in the most effective and direct way currently feasible within Workspace, go to the final section by clicking here.

👉 If you want to see what Gemini and Gemini for Workspace can natively do — without our tricks to integrate them with Gmail better — or you want more context, continue reading.

😢 Within Gmail

As of the time of writing, there are two native ways to use Gemini for Workspace to enhance Gmail: within the Gmail app itself and within the Docs app.

Within the Gmail app, you can open an email, either a new email via Compose or a reply, and the “Help me write” window will appear:

Just like Copilot for Microsoft 365 in Outlook cannot currently reference a file in your OneDrive from which to draft an email, you cannot use the “Help me write” box to reference a file in your Google Drive. You cannot say “Write a response based on ‘File X.pdf’ in my Drive.” It also cannot reference your other emails, like those you have sent to this recipient or those addressing similar topics.

Unlike 365 Copilot, however, you cannot paste any significant quantity of text into the “Help me write” box, so you cannot deploy the strategy for automating your emails that we outlined in our first Tutorial for Microsoft 365 Copilot for answering students and creating slides. With that strategy, you copy-paste the contents of a file that contains or implies the answer for your chosen email, and then you let the AI convert the file into a bespoke email, sensitive to the recipient’s needs and the content of your file.

Here is what happens when you paste a bunch of text into the “Help me write” box, like my answers to common questions I get from my students:

And it does no better if you try to paste the text into the email body itself and then ask Gemini to rewrite it via the “Help me write” box:

So, at the moment, all Gemini can do within Gmail is draft a response based on its generic text-generating capabilities. It can start generic drafts, edit your prose after you type it, and so on.

Perhaps the best option, if you want to limit yourself to this functionality, is to type out a quick response in informal or abbreviated form and have Gemini clean it up for you. But this isn’t what we are looking for…

😐 Via Gemini Itself

You might think that the solution is to go to standalone Gemini directly at https://gemini.google.com/, and not rely on its integration in Workspace.

For instance, you could paste in a student’s email consisting of a question, along with your answers to common student questions (sufficient to answer this question), and ask Gemini to answer the question based on this information.

Take the case of an email from a student asking me a question addressed by my syllabus:

When I paste this email’s content into Gemini, along with my answers to common student questions, it will do a pretty good job:

I can then press the “Share & export” button below this response in order to send it to a draft in Gmail or a Doc:

But this is clunky and inconvenient. Lots of copy-pasting, lots of going to find the relevant information from the relevant files, and the draft isn’t ideal in many ways.

We can do better.

🙂 Via Docs

Within Docs, Gemini for Workspace is much more powerful because it can access all of the information within a given document. In essence, its context window — or the information that it treats as a local input — is significantly expanded relative to that which it has in Gmail. It’s like a conversation with standalone Gemini, but you can have preexisting information in the Doc.

Here is an illustrative example.

Suppose you receive the above email from Jane Doe — namely, a student asking a question addressed by your syllabus.

Suppose, too, that you get the content of this email into your Doc. For instance, you could copy-paste it, or you could use the automated method we discuss below.

Suppose, too, that this same Doc contains information in it that is sufficient to answer the student’s question. For instance, you could have common student questions paired with your answers listed at the top of the Doc, or you could just have your entire syllabus.

Next, you can ask that Gemini draft a response to the student within Docs via the “Help me write” box. This response will be sensitive both to the student’s email and to your Doc’s contents.

Sometimes Gemini declines due to unknown reasons that I hope are ironed out soon. And I have found that the wording matters a lot. But when it works, it works well. Here is one formulation that works well as of this writing:

Here is the result:

You could add more information to the “Help me write” box to adjust the answer or you could “Refine” it via the button in the lower left. Once you press “Insert”, there appears a Gmail email draft in the body of the Doc:

If you click the blue Gmail button, Gmail opens a separate browser window that contains this draft. You can then type in the recipient’s address and press send.

This solution relies on three factors:

  1. Moving the content of the email you are responding to into a Doc

  2. Having the information that is sufficient to respond to the email within that Doc

  3. A prompt to “Help me write” that triggers Gemini for Workspace to draft the appropriate response

The second factor is straightforwardly addressed by having Docs designated for the purpose of answering a certain category of email. The third factor you could address by storing a good prompt in each such Doc.

However, the first factor is annoying and it is an obstacle to Gemini for Workspace being straightforwardly useful.

But there are ways to overcome it, noted below, that don’t rely on external tools or integrations that compromise the security of your Workspace.

🚀 What You Should Do Instead

In this section, I will explain how to use Gemini for Gmail in the most efficient and powerful way currently feasible within the Workspace itself. I note variations and elaborations on this theme in the final sections.

In a nutshell, my solution leverages the greater power of Gemini in Docs to enable you to respond to emails received in Gmail that are answerable by information in your Docs. It automatically moves the content of emails that you designate in Gmail into the appropriate Doc and adds space for you to use Gemini to draft responses to them. After drafting, you send the drafts back to Gmail.

If you skipped down to this section and yet you want a lengthy explanation of how I ended up with this solution, see the prior sections.

Step One

Subscribe to Premium to read the rest.

Become a paying subscriber of Premium to get access to this post and other subscriber-only content.

Already a paying subscriber? Sign In

A subscription gets you:
Two New Premium Pieces Per Month
Access to all AI Tutorials, like our Tutorial on Building (Better) Custom GPTs
Access to all AI Pedagogy Guides, like our Guide on Designing Assignments in the AI Era
Access to Exclusive AI Tools