r/LocalLLM • u/DecisionTechnical265 • 4d ago
Question Connecting Local LLM to Gmail
How do I connect my LLM to gmail. I would like it to be able to read and write emails. I am currently using qwen3.5 -9b on LM studio. If you need any more details be free to ask me.
1
Upvotes
6
u/WorkProLabs 4d ago
Why not ask your model?
3
u/jesuschrist-69420 4d ago
All of the API access is gated through Google cloud, and you may need a workspace subscription as opposed to regular gmail.
Then you go in there and enable APIs for whatever you want, gmail has one, sheets has one, drive has one etc. Set it up with want you want and create your api key.
After that if suggest storing your api keys in something Like doppler and sandboxing your Qwen with the keys outside of the sandbox.
3
u/Confident_Yak_1411 4d ago
Make sure you give it its own email address, don’t use your own. If you want it to ingest stuff then either forward the emails to it or set an automated forwarding filter for emails you want it to receive
3
u/giggles991 4d ago edited 4d ago
You want https://github.com/googleworkspace/cli and https://developers.google.com/workspace/gmail/api/guides/configure-mcp-server . Both are free, MCP requires a free developer account. The CLI provides a standard set of tools and skills, which output into a structured, machine friendly JSON.
Tools+skills like CLIs are attached to the Harness, not the LLM/model itself.
I use the GDrive portion of this on a daily basis with the Claude harness, and use whatever LLM model I want.
2
u/dude_himself 4d ago
I asked my model to create a Gmail plug-in, we worked through the architecture together. Works great!
2
u/AppearanceBest4180 4d ago
used a Python script with imaplib and smtplib, wrapped in a local API via fastapi. qwen3.5 ran fine on my 3060. works offline, no plugins needed.
1
u/archlich 4d ago
I’ve heard inbox zero is good
1
u/GloriousKev 4d ago
There is likely some sort of MCP connector that you can use from your harness and gmail. It shouldnt be difficult. Qwen 3.5 9b should be able to talk you through it. If your LLM has local machine access you can probably just have it configure it for you.
0
u/Iconlast 4d ago
Lol why would you want this
-2
u/Ok-Addition1264 4d ago
OpenwebUI.. but it wouldn't be anywhere near as efficient as gemini itself connecting to it.