# Ch 10: Google Workspace CLI (GWS) Creator: Nate Herk (@nateherk) Transcript of Nate Herk's 2h33m 'Build your own AI operating system' course, split into its chapters. All content and credit: Nate Herk (@nateherk), https://x.com/nateherk/status/2101656269056610682. Transcribed locally with faster-whisper; names may be misheard. [0:51:00] If 500, new community members showed up on Monday, what would break first and growth lever, what would give you 500 more clients tomorrow? If it were running on autopilot. So if you answer these five questions, there is absolutely no way that you're stuck, there's absolutely no way that you think, I don't know what to add to my AIS, I don't know how to make this better. Every time that you answer these five questions, it will find an opportunity for you to automate something, to build a skill out of something, to connect something else. And that is why I built these two skills to go together, audit and level up, to make sure that you're constantly improving and that you don't ever feel alone and you don't ever feel stuck with your AI OS. So I'm not gonna type that right now. I'm not gonna answer that because we have a lot of work to do on our own, but I wanna show you guys something I did recently with Claude Code and Google Workspace. So I live in Google Workspace, right? Everything that I do is pretty much inside of there besides ClickUp. And what happened was I realized that across my company, Everyone had spun up so many different Google Docs and so many different Google Sheets and we had tracker sheets all over and Google search is horrible. It's absolutely horrible. So I was able to connect Claude Code to the GWS CLI. It is one tool and it gives you access to everything in the GWS environment. So I'm gonna show you guys exactly how to set that up in just a sec here, but I was able to do some really cool things. So let me just show you guys a few of these cool things that I was able to do. If I go to my sheets, I have this video database that has all of my videos. It has the thumbnail, the title, a link to them, and a summary, and all of the resources [0:52:30] that are associated with that video. And this is now my video database. And I don't do this manually. Every time I post a video, the video gets pulled in, the resources get pulled in, and then a row gets updated on here. And I built this because it was able to search through my entire drive. It could find all my YouTube videos. That was a different connection. That was a YouTube data API. But anyways, it could find all that, and then it could find all my resources, and then it could just put everything in here. Super, super powerful. Another example, we have this pretty massive dock about our AIS live event. And there's speaking slots and there's, you know, different timings and there's different outreach things. And there's a lot of data here. And I basically said, Hey, Claude Code, go read this document. I gave it the link to this. It opened up the dock in Google drive. It read all of it. And then I said, create me a database, a tracker sheet. And it created this Google sheet because it analyzed everything that was going on in that dock. And it was able to label everyone. It made all of these have drop downs with color coding. It assigned these tasks to everybody. It was able to just do everything for me. And this would have taken so long for me to do manually. Another thing I was able to do is I have like all my YouTube videos stored locally and it was able to search through that, organize everything, date, everything, and then upload all of that to drive. And then it deleted everything locally. And now what I could do is I could have it organize all of these into different folders based on the date. So it can just help you organize things, move things around, create things. And all of this living inside of my Google Drive, inside of a shared company Google Drive, is awesome because it can find things instantly. And everyone else on my team, I was like, [0:54:00] hey guys, can you use the GWCLI real quick? And can you look through everything you've ever built for the company and can you put it into the shared drive? And now all of our AI agents are able to touch all of the things so much better. So the GWCLI is a huge unlock. Unfortunately, if you use like Microsoft and that is your main environment, The GW CLI probably won't be too useful for you. I'm sure there's something different for Microsoft's environment that you should use, but I'm gonna play a quick clip for you guys about how to set up the GW CLI and a little more information about it. So if that doesn't appeal to you or not interesting to you, or you already have it set up, then go ahead and skip past this next part, but I'm gonna play this clip real quick. Google just dropped what some are already calling the most powerful workspace CLI on the internet. So if you've got a ton of stuff that lives in the Google environments, just like I do, then you're gonna love this. Because now any of my Claude Code projects So here you can see I said what can you do with which is Google Workspace CLI. So it can search list upload download move copy share anything in my Google Drive. It can do anything in my Gmail. It can do anything in my calendar. It can do anything with Google Docs. Same thing with sheets. Same thing with slides. And it also has multi-step workflow recipes. So these are basically like skills. These are patterns for common tasks like code, code, and then you can do a command patterns for common tasks like creating docs from templates, reading sheet data, and creating a report doc, finding free time and scheduling a meeting, and there are over a hundred of these that it actually has. So out of the' the box, when you give Claude Code, the GWS CLI, [0:55:30] you can do anything across any of the tools and you also, have access to over a hundred skills. So I don't know how many times you guys have tried to use something like cloud or end end to build you a Google doc and you do this over API and it ends up just looking like something like this. It literally just looks like raw markdown and it's obviously horrible. And sometimes the goal along with a YouTube video, I make resource guides that look like this, but obviously they have to be formatted. I've got like a header up here and I've got links and different things in this format, but now I can literally just take the link to a YouTube video. I can drop that into Claude Code and say, create me a YouTube resource guide. It's going to go ahead and download that transcript from the video. And now what it's doing is it's creating the Google doc, not via API call, not via MCP, but via a bash command, meaning it's literally running a terminal command in order to talk to Google and make this. So it just actually created the dock, here's the ID, and now it's going to populate it with what I need. And now it finished this up, it gave me the link, I'll click into this and we can see boom, we have an actual resource guide. It's got the image inserted up here as a header, it's got a link that goes right back to my YouTube channel, it breaks down the market, traditional automation, it goes through all this stuff, and then even has my CTA at the bottom as you can see after all of these horizontal lines to join the plus group. So that was obviously just one quick example, but there's so many different benefits here using this workspace CLI. The first one is that you have one interface. So basically, like I said, it was one GWS CLI that Claude Code now has access to, and it can access my Gmail, my Drive, Docs, Sheets, Calendar, Admin, and more. It's also JSON first with structured responses. So our AI agent is really, really good at working with it. We have auto discovery, meaning the CLI is pretty much always going to stay [0:57:00] up to date automatically. Pretty much zero maintenance because we authenticate and then we're going to be good to go. It has built-in skills for triage, for prep, for generations. Like I said, there's a hundred others and it's not much overhead because it's basically just one tool. It's not the same as like having all these different API endpoints or all of these different MCP configs and tools that would take up more context. But I know you're probably wondering what is a CLI? It stands for command line interface. And what we're typically used to is a GUI or a graphical user interface, where we can see buttons, we can see form fields and we can click on things. And that's how we navigate. But computers are more navigating by text and by commands and by typing. So that's really all that a CLI is. And this is an open source Google workspace product. and obviously it's completely free. So I'll leave a link to this GitHub repository down in the description if you wanna check it out, read more about it. But I'm also gonna walk through some of the key details right here. The first thing that I wanted to show you is if you go down here to the skills, this is where we can actually see all of the different kind of recipes they call them for pre-made multi-step workflows that it has. As you can see, creating events from sheets, creating presentations, creating meet space, label and archiving emails. There's so many different patterns that you might use from this pre-built library. Now, if we keep scrolling down, what you'll also notice is that right here, it says, this is not an officially supported Google product. Now that doesn't mean that it's unsafe. This is an actual Google product, but the reason why it's not officially supported is because right now it's more of like an open source beta. It's kind of a developer playground rather than like an enterprise backed software. And you can see right here that it also says, this product is under active development, [0:58:30] expect breaking changes as we march towards V1.0. So this thing's already really good out of the box and it's only gonna get better. And you can see, like I said, when Google workspace adds an API end points or method, GWS picks it up automatically. So you might as well chuck it into Claude Code right now and start getting used to it. Okay, so I just uninstalled this so I can walk you guys through step by step how this actually works. It's super easy. What I do is I basically copy the link to this GitHub repository, as you can see. And I'm gonna basically just give it to Claude Code and say, hey, I want to install this GWS CLI, read through the documentation and help me install everything that I need to install. And then we're gonna get set up. So this is basically gonna do all the research for me. And then all I have to do is follow its instructions. So it read the docs, it's looking at what we already have installed. It basically saw that I already had some of the prerequisites. So if you don't have those, you'll have to install those. And then it told me that we needed to install the CLI. So it did that. And now we have two options. So the first one is to install gcloud CLI so that we have automatic setup and auth, or we could do it manually by creating our own project and whatnot. So let's just go ahead and try option A. Okay, I thought this was gonna be just like a simple command that it ran and then we were good, but it's actually like some other thing to install. So let's actually go back and try manual and I'll just show you guys, I guess the harder way. Okay, so I'm gonna go to this link, go to our Google Cloud Console and make sure you're signed in with the right account up in the top right. And I'm just gonna go ahead and create a new project just to show you guys what this would look like. So new project, I'm gonna call this one, Claude code GWS, and we're just gonna go ahead and create this project. [1:00:00] So this is spinning up right now, as you can see. And now that it has been created, I'm gonna select it, so we're inside of it. And then I'm gonna go up here and type in APIs and services, click on that. And we have to set up our OAuth consent screen. So I'll click on this and it's going to say, get started, click on that. We have to give our app a name and then we have to choose an audience. So I'm just going to do internal because I only need this right now for my own organization. If you want to do external, it'll basically have you do testing or published. And if you do testing, just make sure that you add your email as a test user. And then all you have to do after you put in your content information is hit, I agree, and then you go ahead and create that. Now, once that has been done, you're gonna go to create a client ID. So I'm gonna go back into APIs and services, I'm gonna go to credentials, and then I'm gonna go ahead and do a create credential of client ID. Now in here, we're gonna choose a desktop app. I'm going to just call this GWS and go ahead and hit create. And now we have our client ID and our client secret. And so what you're gonna do is download this as a JSON file. Now you can see here that it says to download that file and save it to your global.config slash gws. So basically if you can't find this, just say, hey, can you give that to me in a full path? And then you can paste that into your finder or your file explorer, and it will take you there. It will probably look something like this, and then you just drag in that credential thing. I called mine client underscore secret, and Claude Code will be able to look at this globally now. And so what you'll notice is that we didn't in this project yet enable these APIs. So let me just show you what happens without that. So it says the last step is to run gws auth login. [1:01:30] So I just said, hey, I finished option B, the credentials are called client underscore secret, and then I told it to run the auth login. So that should basically open up a tab for you, but if it doesn't, then you can ask for it to give you that URL so that you can actually authenticate in. So you would basically choose your account that you wanna use, and then you just have to basically confirm that it can access all of these different things, as you can see, and then when you hit allow, you should be properly authenticated. After that, it's gonna come back and say, okay, cool, let me see if everything works. Now, this hasn't been perfect on the first try every time, but if you just go back and forth a little bit, say, hey, that didn't work. Hey, this is what I'm seeing. It will be able to get you there. It's gonna be your best friend for something like this, because remember it can read all of the actual documentation. And now it says that the auth is working, but we have to enable these APIs in our Google Cloud projects. So basically just clicking open these one at a time, and all you have to do is hit enable. So it's super simple. You just have to do this, like I said, for all of these different services that you actually wanna be able to use. So that's why I did this on a new project, because I just wanted you guys to see that. But if you already have one that has all these enabled, then you can just use that project and generate that OAuth client ID. So there you go, you can see that this works. I said, can you find my Google Doc that I made in April 2025? And it went ahead and pulled links to all five of these because obviously that was a very vague request. And now we can take action pretty much anywhere in Google workspace, super simply with this CLI. But like I said, I just got this set up today and I've been playing around with it a ton in my executive assistant project and it's been awesome. It can literally do anything. So here I'm asking it to grab my unread emails from today and based on what it knows about my business [1:03:00] and my priorities, give them a score. And if the priority score is below five, just mark it as unread automatically. All right, so here you can see it said, got 30 unread emails. Here's my priority score based on your business context. And as I scroll down, you can see that it's getting different ratings and based on what I'm seeing right now, this actually looks pretty good. So then I started playing around with the Google Slides because I use Gamma right now, but at some point I could imagine that if this gets good enough, then I wouldn't need Gamma anymore. And this is a free option compared to Gamma subscription. So I had to create me a slide deck and it was okay. I threw in my brand guidelines, I threw in my logo, and I said, hey, can you see this? You created this using the Google Slides, and it's okay, but there's some weird things that I need you to fix. So then it came back and said, I cannot see the Slides, I just know how to build them programmatically. So that's why there may be some errors with spacing and stuff. So then I basically just gave it access to Chrome Dev Tools so that it could open the page, screenshot it, look at it. And then we built a plan to add visual validation to this Google Slide Creator skill. So now you can see, as it's going through, it actually takes screenshots and then it can make fixes based on that. So then after it fixes everything, it says, okay, cool, updated the skill, take a look at it now. So I'll open up this link, brings me to Google Slides where I have this slide deck. It has kind of my brand colors. It's got the logo up top right. And then as we go through, we can also see that the spacing is a little bit better. It's still not perfect, obviously. But we have custom images here that were generated with Nano Banana 2. And even the images are kind of on brand with the sort of orange and blue color scheme. As you can see, we've got this one with the WTE framework. We've got this slide. and it even ends with a CTA for the free Skool community. [1:04:30] So just to see what else happens, I'm gonna say take a look at the slide deck and do another audit. How could you improve the skill in the future? So it's gonna go ahead, open up a tab as you guys just saw, it's gonna take images, it's gonna flick through the different slides and capture them, and as you can see over here, it now says, take screenshot, and now it's reading that screenshot right there. Now it just moved on to the next slide and it's gonna go through and look at every single slide and then it's gonna come back with a plan. And we could probably do a similar visual and validate flow with creating Google Docs as well. So now you can see it's almost onto that last slide. And I hope it fixes this last slide because what you can see here is that the spacing is really off down here. So you can see it came back with an audit. It came back with some future improvements. And one thing that I did notice is that because I made the window smaller, its screenshots were probably worse quality. So it said presentation mode screenshots would probably be better. But anyways, I just wanted to give you guys a little taste of how you can use the GWS CLI, but also use it with other tools to make the functionality even more powerful. So just remember that this is very new. There's a lot of people out there on Twitter right now saying that this is insanely overpowered. There's also a lot of people that are saying that it just feels kind of finicky. So far for me, it's been pretty great. Everything that I've asked it to do or find or schedule, whatever it is, it's been doing that pretty much perfectly. But there are some people saying that it's asking them to re-authenticate multiple times. So if that's a little frustrating, I guess just keep in mind that it will only get better and we're not even to version one yet. So I would definitely recommend that you come to this GitHub, read about it, but more importantly, get this thing installed in your Claude Code setup and just start using it, using it, using it.