Turning a Google Sheet into a Pocket‐GPT: Our 15‐Minute Build, 3‐Hour Debug, and 1‐Click Win

About this video

John builds a 'chat box' inside Google Sheets that works without a ChatGPT account: drop your own API key in, type a prompt, press Run and get a GPT-4o reply. He walks through the short Apps Script behind it, the hiccup (Google blocks network calls from selection triggers), and the fix — a Sheets drawing assigned to the script as a one-click button.

Transcript

Read the full transcript of “Turning a Google Sheet into a Pocket‐GPT: Our 15‐Minute Build, 3‐Hour Debug, and 1‐Click Win”

Source: YouTube auto-generated captions, lightly cleaned (repeated caption lines removed, misheard brand names corrected).

0:04um makes you sound or not sound like a robot. It's thing. But so do these tats and so is this background and all of these things going on back there. There's the pool and all this stuff. So I'm pretty real definitely not AI. uh today's conversation uh let's build actually yeah let's build a tool where um for 100 people I'll give you as many API keys as I can generate I'll give you one for every person um it gives you access to the latest version of uh ChatGPT or whatever it is but doing. So, I'm in a spreadsheet and then that way for um folks, you guys can experiment. You can learn. I won't be able to see what you're doing. I won't be able to access any of that. Um but let's create something. Let's do I think the word is that's been out there lately by all of

these folks. I'm being snarky. Yes, master class on just using what we have to make the most out of it. and we're going to use a ChatGPT. So, you're going to watch this and we're going to build it together. I've never done this before. We're going to start from scratch and we're going to use Google Sheets. We're going to use App Scripts and we're going to use GPT um to help us and we're going to try it in one shot.

Maybe it works, maybe it doesn't. But a few things I have open to get us prepared um and for you as well too that you're going to need. So, things you're going to need Google Sheets, Google App Scripts. It's free. It's It's in the Sheets. It's under extensions. We'll get to that part, but just open up a Google sheet. It can be untitled. You can title it. You can do whatever you need to do. And I got this funky image. So, let me move this funky image. I'm going move it up to the right. Uh, Loom, do something about that. But I love your tool. Then open up ChatGPT if you have it. If you don't have it, then just follow along and listen watch and then at the end you'll get access to ChatGPT. And then the second part is if you

have ChatGPT, you're going to have to open up a different screen. So you're going to have to go to the open AI part of this, right? Um, and the op openai.com, you're going to have to go to your dashboard. And then what we're going to do is we're going to create a secret key. This key is going to give us access to do the things we're going to do in this baby right here. Basically, you know, I know a lot of y'all are out there using GBT and you're running out of prompts and you have limits for chats and you want to use it, but um you might not have the the the ability to for multiple reasons, right? So, within reason, I'm going to open it up and it's key. I'm going to generate on this for all of y'all that think you're just going to

3:16take advantage of the situation cuz some of y'all are super smart and some of y'all are just, you know, fantastic individuals that want to take advantage of things, ruin it for others. I'm just going to say that out loud. I'm going to delete that key. And so what I'm going to ask is is that if you want to use this tool and you want me to generate a key for you, reach out to me, DM, supply you with that key. I mean, the reason for it is so that it um becomes excessive, I can just turn it off because I don't want to ruin it for the other hundreds of folks that might be able to benefit from this. Be creative.

Push the limits in advertising, math, work, science, whatever you want to use these tools for, right? And there was a rumor out there that you couldn't actually manage Google Ads through GPT. That's false. you absolutely positively can. There are just steps that you need to be able to do that and that's not going to happen today, but that you just need API access to do that. That is a fairly simple and straightforward process where you can do that. So anyways, on to it. So we're going to do first is we're going to talk to GBT and we're going to say, "Hey, what is up, dude? We want to build something in a Google Sheets. Are you up for it?" So, let's talk to him. So, I'm going to talk a little bit. And on the side, I got Bay's Kids. So, if I'm distracted and

pause for a moment while I'm doing this, it's because Baby Kids is on. And it's probably a funniest cartoons that was ever made in my humble opinion. So, here we go. Hey, my friend. How are you doing today? Let's see what we got. And then we're going to use 03. Um, so it might be a little slow in the whole world out there. We're doing great. So, we're in the we're mode. Anything or you want to dig into together? Yeah, I did a PR today where I pushed a 225 twice over my head and I'm 15 pounds heavier and I lost the belt size. What do you think? What do you think it's going to say? I know this is not exactly what you guys are expecting.

It's just a little humor. It's me. I'm veryant and all of the things. See, look at that, man. What's been the secret sauce lately? No. Living life. Fortunate. Yep. Okay. So, I do have a question. Are you ready to get to it? Okay, cool. Well, lots of in advertising don't have the ability to use 03 or um earlier versions of GPT. So, I'd like to gift this to them and build a sheet that they can use as a chat box. Hit run and it outputs like you and me are having a conversation. Misspelled by the way. No, not conversion. Sorry.

7:00converation right now. Is that possible? And see, I'm I'm not telling you what to do. Like, don't tell GPT what to do. Don't tell Claude or Gemini. Don't tell it what to do. You're going to run into like a 100 Roblox. Let's let it think and let's see what it comes up with. Because again, this is something that's new. I've not done it. And it just popped in my brain because I was watching all these master classes and all of these folks out here do all this stuff and I'm like, why don't we just give it to the world? Let's see. Looks like it's figuring it out for us. What would be super amazing is if it did it in like one swoop for us. Oh wow. It just laid out the big picture plan for us. Are you guys ready?

Are you absolutely ready to get this and rock this out? Yo, that's dope. So, share a template sheet with two tabs. Config holds the API key and chat the conversion log. Paste a Google app script that grabs the key. Build a chat history array from prior rows. Writes to assistant replay back to the sheet. Add a custom function or an onit trigger so each message auto fires. It says it's going to take us about 15 minutes. Yo, this is crazy. Okay, let's make some modifications, though. I mean, let's oversimplify this baby cuz I I don't want a whole bunch of lines. I just want like two like blocks. Okay.

So, let's refine that a little bit because it sounds good and it looks like, hey, just do this and autoop populate and auto do this. Nah, no. Let's make our own version of GPT. What do you think? I like it. Okay, let's think about this. All of what you said sounds great and good, but and now let's outline what we want. I'd like to have a run trigger. I'd like to have a single input can on run each time and sure the conversation continues. Am I missing anything else that best represents you? Let's see. So staking and then you know rather than just running with it like the habit for all of us is to just like run and jump like yeah I got it. But what I'm doing is I'm just I'm I'm qualifying it right here's the streamline design. That's it y'all. Do you see like

10:50I'm just I'm more qualification. And to be fair, like I've been at this since April 2022, and it goes back to Anakam asking me to solve something with JXT Group. And if you see this, what's up, dude? Tell everybody. I said, I'll be up. But I was just like, wow, okay, I don't need to be like a super wizard at coding anymore. And I, you know, I was all right, right? Hey, I could figure out like a script in Google Ads, but now like I can look at it and be like, well, something ain't right. What is this line? I understand how to grab the code and all that. I'm not going to do that today. I think some people are like, is this a vibe code? But also, are you asking the right questions and are you setting boundaries? Because if you don't set boundaries, every single time it's

going to start over and it's going to refresh. That's the catch, y'all. That's a little like insider $1 million tip. I think you're going to get that for $999. Today is free. I made another funny master splinter. It's because I'm old. See the gray hair tangent. Uh so back to it. What we have here is we have one input box, one output box, and one run trigger while still letting the back and forth flow like our chat here. So what we're going to do and we can start this process now. It says sheet layout front tab chat. So I'm just going to go ahead and I'm going to make this ch A.

12:12Boom. So if you look at the Google sheet, we have a Google sheet still untitled. That title of the sheet means absolutely nothing to us just for memory. But what I'm going to do here is I'm going to say demo creating GPT Amigos. Yep. Okay. So that's done. And it says B1 a single prompt. So B1, that seems rough. So it's going to be my prompt cell. So what I'm going to do is B1 is going to be it. But what I'm going to do, so it's a bigger prompt.

And just for the sake of all of this stuff, I'm going to make it a a bigger thing for like context and all those things. What do you think? I like that idea. And then how do you format it? We have to do that. And it looks like cells. Where is it at? Oh my gosh, I forgot how to use Google Sheets. I'm just playing. Um, we're gonna come in and we're gonna merge. Okay, now for all you sheet experts and you're like, "Well, he doesn't even know how to do that." You know, look, if you got the shortcuts down, you go for it. Okay. Um, James, Jonathan, Joe, Mary, who cares? Like, listen, do what you need to do and do it for you and do it the best way. And then also, um, let's format this because I like formatting. And some people are going

like, "Well, don't you know how to automatically format?" No, I don't know how to automatically format with six keys on a Mac. I don't know how to do it, but I do know what this box is. It creates borders. What we're going to do is just we're going to create a border. I couldn't help myself. For all the people that know everything, are super critical. I'm going to be critical of myself. I don't know how. I just don't I don't I have no interest in learning how to like shortcut a key. What I do have interest in though is being innovative um and making it work. And we're about to make this work. Um and then it says in C1 assistant reply. So we're definitely not going to do that. So we're going to just make this into our thing because it's kind of giving us the

jive already. And so I'm going to merge this. But what I'm going to do next to this is I'm going to say input keyboard. And then I'm going to go back and I'm going to tell it what I did because I I'm seeing already like what it is. So then I'm going to make like a big ass box. So let's make a big ass box because it's got to be the output. Now I know you're like, "Well, John, I like reading from the bottom up." No, no, no, no. In this example, we're going to do this and then you can do whatever you want. The idea is to show you what we're doing and how we do it. John way, not your way.

15:05Your way is take this idea and make it your own. Um, and I'm giving you those tools, okay? To do that. And then you can like create to your like heart's content. So, we're just going to do all of this. We're going to vertical line and we're going to say reply here though for this to those who are watching and to those uh that are interested. Hide. Yeah, let's just do that real quick. to all those that are interested here really is that you make this your own. So I know you're watching this, you're seeing this and when we get to the coding, you're going to have to do this on your own. Okay? And so what I'm going to do now because this is going to be this is going to be critical. I'm going to try to keep this all in the same screen.

Okay, you guys, again, I've not done this before. This is going to be our run area. Okay? And Um, I know you're like, "John, you've done this." No, the heck I have not. And what inspired me was this dude reached out via text and he's based out of Florida and he was like, "Look, dude, you got to do this cuz I'm loving this stuff." And I remember when you used to do this stuff and we really need more of it. And so I'm like, "Okay, dude. Give it a shot." And that dude's name is Ian.

So yeah. And then it says like a drawing shape. So I don't have that type of skill. So, what I'm going to do is I'm going to hit this control copy thing and I'm going to see if we can like paste this in there. Yeah. Who said you couldn't do like a control copy paste? We just did it. I'm going to center that. We got like now we have this crazy thing going on. Don't like that it's at the top. I that like just bugs. I mean, because of that, this isn't I don't like the scroll thing.

That bothers me as well too. But let's make that 90%. And let's add this. Now I'm getting in formatting. And that's just because like like some things bother me and other things don't. And that's just the thing that bothers me. So we got C35D 36 is my box. And we need to tell this thing that because it's going to make all of these adjustments based off of what we just did, right? You're like, "What the heck is C3536?" So, I just created this merged group of cells. And that's just this little box right here. So, it has a name. I'm going to name it, for the sake of this, I'm going to name it run. I'm going to name this group of cells instant reply. Assistant reply, didn't work. Run. Yeah, for this group of cells, I'm going to name it reply. And then I'm going to name this

18:23Oh, I know why this is reply. I can't have separate space. It's got to be connected. And then I'm going to name this box input. Okay. And because we're like in a working session, I'm just going to give you guys a key, right? So, our key is, and again, you're going to want to rename this and do this yourself, but we got input, we got reply, and we have run, right? We have that. And for the sake of this conversation, we have these things.

You're never going to have to use these. But if you just use the sheet, make a copy, and I give you a thing. But if you want to take this and you want to do this yourself, you are going to need that. And again, just for consistency, because I like have like add on some things, how I like them. Again, my preference on things. Um, not saying you need to, but for how I like things, I'm just going to do that. And with that said, I'm going to move the borders cuz as you notice, three things don't have it. and then run has it.

Okay, so now I did all of this. Uh, hi. I know we just did all of that. Hi. I want to inform you um uh changes to the sheet. I have name boxes that are input, reply, run. Let me make sure that they're apply. I think they are case a title case. So, yep, there are. So, we're going to come back in here. We're going to delete B1, it's a box input. And I'm be clear, right?

Instead of a C1, I have is reply. instead of E1 it is run. Does that make sense in our steps? So I just I it's it's again I'm working with it. I'm not just asking it to do something and and I made some changes and to be fair that it it kind of makes some of this complicated but we want to get this right. Right. So before I even get into the code and I I know like what it's doing and how it's doing it and it looks like we got it right. So it looks like it's got our active spreadsheet which is chat. It's got our prompt which is input. It has our reply which is the range. And then it looks like it has return and run and all of those things. And it looks like we're waiting on the open API key. So it looks

21:11like we're doing really good. And you're like well where the hell did you see that? So if I look in this line of code and I look at lines one, two, three, and four of the code, right? I can see what we need and this is JavaScript, right? So again, we got this thing up here. So we redid this first part. We got our prompt cell, our reply cell, and we have run. So it's pretty dope. Everything else, API key, message history, uses containers live behind the scenes. So end users only have to see B1 and C1.

However, we're just a little different. Okay, so this is going to run. Boom. Adigity. So how the flow works, user types in input. So where V1 was that it is now input clicks run, which is what is the button run. I'm the script pulls the conversation calls whoa GPT4. I I like 40 to be truthful. 03 is pretty dope, but I got bugs when I was running data. So, 40 O is going to work. It's going to be really great and you're going to be uncapped and being able to use this, which is input is cleared, but a C1 will always maintain, right? Nice to have touches. So, it does look like idea a usage counter. So, add a usage tab so you can watch cost. I don't need to do that because I have all that on the back end. Says auto resize output if replies

get too long. Bio key mode if you prefer user to paste own key store in cell A of the config sheet instead of a property. That's actually interesting. That is actually interesting. You know what? Bring your own beer. Let's bring your own key. Let's do that. And I really like that. I like that a whole lot. So, we're going to add something else. We're going to do We're going to do Y um O key. We're going to do that. Yeah, I I think so. So, we're going to do that. And it it is suggesting that we do that in cell A1 of the config sheet. Again, I want everything in chat.

I don't want like 600 sheets. And then keep a drop down in D1 friendly formal ad ops guru that you pretend prepare to each prompt for consistent voice. Actually I like that too. I like all of that. I like those things. Let's add some personality. Nah, we don't need any personality I thought about. Let's keep it super stupid simple. So yeah, we're going to append the key, but the B yo key is going to be down here at the bottom. But we are going to do Y O um key, which is your API key, and that'll run here in this box. So we're just going to hit the bold, and then we're going to merge these cells.

24:24And again, I know this is annoying and I apologize, but we're just kind of creating. Okay. And we're going to name this key. Here we go. Boom. And so our consistency, we're just going to hit them with a good old. And actually, because it's kind of super important, we're gonna just add a little flavor to this one. And we are going to Yep. Oh, let's decorate this one. Why wouldn't we decorate it? I like decorating things.

Let's decorate it while we're at it, cuz I don't I have a feeling it's not going to take super long. Oh, white is such a thing. Let's make it gray. And let's make our text color white. Let's make this one black. And let's make our text color white. What do you think? Yeah, I like it. It's fun. And then you, of course, you can dress it up however the heck you want to dress it up. Okay. I really like this. Like this. Let's just reconfirm a few things.

We are working only out of the then we're just going to reconfirm. We're going to reconfirm Um, and do you see how it still did B1 and C1 and E1? What we need to be very careful about is because it's going to look for that in general. I don't want it to look for that. I wanted to look for the boxes. We are working only out of the sheet chat. Um, there is a B yo key in this sheet. Find that name box.

Let me just make sure I got the proper name box. Again, we want to make sure you It's not going to work. It's incorrect, you guys. There's a view key in the sheet. Find that name box input. There is a box. What happened? Oh, yeah. Whatever. It doesn't matter. I'm in a chat box for one which is run. Every sheet will be different. Um please just look for these name boxes. And we do want to use the BYO key feature which I mentioned above. Does this work for you?

27:40It makes sense. Am I missing anything before we start to code a bit? So know we've been at it. I'm kind of hidden doing all this stuff. We are good. My screen is recording and I'm doing all this and so yep, visible to end user. Yep. Input. Yep. Reply. Yep. Everything. Yes, you can protect it, but keep it editable. I like to me again I'm going to delete the key that we're going through in this example. Purpose of this for you to use.

So I've just been cleaning up while I've been going and people are like wow you're just you're kind of thinking through this. I want you to think like this. So ChatGPT is AI is a version of your mind and your limit. It's nothing else. People are like no you can't do that because it doesn't think the way that we have process one through two. Well, there only two processes, right? Now, that mean there might be multiple steps under each process, right? If you're thoughtful and you're a thinker and you have all of these wonderful questions, like look, it's it's present for you. It's it's there. It's a gift.

This is a gift. So, we just did all of that. And so, now it's it's telling us here, if we're looking at the screen, key source grabs the value of the key and runs chatf fire blah blah blah. I'm tired of reading it. I'm exhausted from reading it. I've like I'm Have you ever got like a toy for Christmas for your kid and somebody puts some instructions down and you're like I don't want to go do that. And then you do all of that and then you miss like a a bolt or a nut or a screw just so frustrated or it doesn't tell you that you need a screwdriver and you don't have that screwdriver or you need some random C1 size battery the little circle things like forget about it. I get annoyed by these little things, but they are super relevant. For

the sake of this, it's been up long enough that you should have read it. I'm not. I'm going to skip it. It's saying, you know, there's some guard rails and all of that. No, the guardrail is going to be me weekly checking um on API keys that I give you if you want it. If you don't use your own and you don't have it, because if you have your own API key, then you don't need this. and you don't have your own API key and you want to do this, let me know. Go through build this out and you can always DM me. It's instrumental because it'll be able to help you with like the things that you need um to to to help your business. And remember, it's it's so and um the prompting sometimes can be long. So, just you know, maybe have a word

30:25document open or something of the sort. But let's we're going to run some tests. We're going to work through this. Cool. We are ready to go. What is next up for this? I'm going to drink some water, too. And I had a piece of chocolate today. Was crazy. It was absolutely crazy. Oh, so what does it say? What do we got here? Uh oh, we're Blizzed. What does it say? There's a single app script you can drop straight into extensions.

It follows every rule. what we disagree upon. So, basically, you're telling me that all I need to do is copy this and paste it in. Oh, okay. Is that it? I mean, it really is it. So, it should We got all of our things. Paste the script into app scripts and boom. Okay, so we got a sheet. So, the next thing we got, we're going to go to extensions, y'all. We're going to go to app scripts. You can give it a name. I mean, so what I'm going to do is I'm going to name this demo creating GBT and I'm going to rename it. Not getting super complicated here. So, I'm just going to delete all of that. So, when you open it up, delete everything that is there. Don't forget that. And then I'm just going to hit paste. Now, this and you're like, well, what the

hell are you going to do now? Well, actually, you can see John Williams that it all started with idea.com. What I'm going to do now is I'm going to hit this save project button. All right, I'm gonna follow the instructions. And after I hit save, I'm going to hit run. Okay, Google should ask me um to authorize this stuff. So, we've come a long ways. I'm going to hit review permissions. I'm going to say, "Yep, yep, yep, yep."

I'm going to give it a thumbs up. I'm going to select all. Feel free to read all the stuff if you want to read it. I'm not going to do that. I trust the platforms that I use. It looks like it started and it completed it. So, that's it. Hand the template to anyone. They drop in their IO key, type a prompt, and input. So, now you're like, well, how the heck do I generate a key? And are you saying whoa? Check it out. Looks a little different. Yes, it does. Look at that.

33:00Look at that. We got words in here, y'all. I didn't do it. I didn't do it. I did not do it. It did. We did it together. We did it together. We just made GBT. We made our own version of it. We didn't need a web browser. We didn't need all that. Now, if I was a betting man and I wanted to create my own agent and I have my own agency and I wanted to give all the businesses in the world something like this, guess what I could do? I could go to WordPress.com or I could go to GoDaddy or HostGator and I could create a page. I can go to Wix and I can say, "Can I drop in a form?" And you could drop in a form and guess what you just did. You made a browser with GPT. I I gotta tell you

what what drove this idea besides saying something to me was that I'm working with Hootsweet Enterprise. So, it's going to cost me like I don't know like $15 freaking,000 a month. I'm not paying for it. I could figure out like why it would cost me $15,000 a month. That's why you have procurement, right? They're like, "John, you got procurement?" Yeah, I have procurement because I support a multi-billion dollar business. My job is to find things and do things that other people won't do. I do that for a lot of businesses in general. I consult um and I support and I love what I do full-time, part-time, all the time, all hours of the day. But for all of you out there that want to give this to people, what we did was we just created a website. It's an open public thing that you can use, but you're going to need a

key. So, what we're going to do is we need to learn how to create this key. And so, rather than just speaking it, let's type it in. So, how do I create this by yo key? Also, you could I mean you could do this in the Slack. So, you could create a Slack channel that is GPT built into your Slack channel for your clients. So, every client could have their own version of GPT that's built into your business. And then you can give it personality and all those things. I'm just spinning my wheels right now on all the wonderful things that you could do with this. It's pretty freaking cool.

It's asking me for money and I'm not asking y'all for money. We're doing this one because it's for industry. All those gates that are out there. Um, every time somebody um, I've made up my mind um, in the last 30 seconds. Anytime somebody publish something and they're going to offer a master class or they're going to offer you a script or a platform or a service and it cost you money and all you're trying to do is serve a business and become better educated, I just want to let you know, hey, DM me and we'll figure it out together. I'm always willing to like shut the stuff down so that you get a very basic stripped down version or you get this really imaginative creative version and yeah I'll do it for f re e I'll do it for free and yes I'm being snarky again but

36:15I love you all of what we do is bigger than that and yeah I do and am grateful for money and yes I am grateful for all that I have in life and I'm grateful for it but so many people have used me and taken from me to build up their own businesses and in the blink of an eye said like deuce and they're still making money and they're still doing good and they're making like three times more than I've ever made and they can't do half of what I've been able to do for them. Yes, that is a little bit of frustration in that sense, but it's heartbreaking because I really truly care and have always cared about what I do and how I do it to make our lives better as advertisers. I love this game.

I love it. I love everything about it. And we don't need we need more positivity. We need more people thinking. We need more people supporting these businesses and making it easier because they can feed their families. And then in turn, maybe we can feed our own family, right? Or maybe we can give back. So this is an OD to that. So it looks like right here it says create a login. We got all that. Let's generate a secret key. Let's store it. Let's paste this key into this sheet. So we did all this earlier. This is really easy. We're going to come here, create a secret key.

We're going to name this ego. We're going to create a secret key. We're going to hit copy. We're going to hit done. We're going to type that little thing in here. Looks like it is like a whole another color. That doesn't work. So, that like letter font thing isn't going to work on that color. Uh, but we're going to paste that little baby in there. It's in there. We're going to say, "Hey, dude. Dudette, I'm kidding. How are you today?" I want to see if this works. I'm going to hit run. I What happened? I hit run and it didn't work. What happened?

I see that's what all this is about. Yep. That is what all this is about. So, we're going to we're going to come back in here and we're going to say, "Hey, hi." We pasted the key in the BIO key box typos and I hit the run box cell and nothing happened. Can you make sure my run thing box is an actual button? Now, do you need the script and please don't change anything? Only improve it. Super important. You see this last line?

39:29Don't delete any functionality, please. Only improve. What this is right here, this is to close this out. Very purposeful. So, you're not circular. If you don't put this in there, then it will restart your whole entire process. And imagine being like 5,000 lines in the code or 10,000 lines in the code and you're super junior. I mean, you're like green, like fresh out of elementary school green. If you have this in there, it will always save what you're doing. I You're still going to run into bugs.

You're still going to run into kinks. Another line is please don't change anything. Please make sure all changes tie back to the original goal. Now, if you have like 10 files, you want to say make sure all these changes are updated across all the files. And this is our goal. We just want to create a mirror. What I'm going to do just so it remembers everything. I'm going to come in here. I'm going hit A. I'm going to hit control C and I'm going to help it remember. Here is the original code. I'm not using cursor. I'm using GPT. Okay.

I'm just help it out. Work with the tools. Think through this process, you guys. Don't just like expect it to get it. Help it out. Right. So, now it's thinking through it. It's looking at it like, yeah. So, here we go. Below our two non-destructive tweaks. So, your runbox really behaves like a button. Here we go. Right. So, I have that. I have all of that. assign the script. Okay. So, we're going to hit copy. This is option B. Nope. So what I want to do is please provide the fully updated single script that just turns the runbox into a real runbox. It keeps everything else the same. Don't change anything else.

Do you see how it it tried to give me a portion of it and then you're like, well, that didn't work. This is this is great. Like, this is great. Here we go. Do you see? Now I I'm with one small addition. Helper fires run chat whenever somebody checks or edits the cell name. Run. That's it. Now, let's see. And I don't think it's going to do what we needed to do, right?

42:22Copy. It says it's a checkbox and I don't think that's what I want it to be. Just want it to be a button. And again, this is like teaching it how to do it. And I know how to create a button. So for all y'all just saying like create a button, like look, I know how to create a button. It's not the point of this. Done. Save. Hit run. Just make sure all of this stuff is good. I'm going to come back in here.

Look what we got. Hey, I'm a bunch of code. Yes, you are a bunch of code. Yes, you are a bunch of code. Is good. I'm in Arizona and it is hot outside. Pool is code. Cold, not code. I said code. So now this this is the catch. See, it still didn't do it. Okay. So, I'm double clicking on the name box and it it it didn't it didn't work. So, I'm going to tell it that I'm uh clicking on the name box run and it's not processing. I don't want questions, responses. Do you see typos the whole thing? And then please don't change anything or any functionality.

Please just update the code to reflect. Can you help me? Do you see how messy that is? But it gets it. That's it. Like be you. Be you. And it's super messy, but be you. Okay. That's it. The only fire is when the box is checked. True. It's unchecked. It's not unchecked. There's There is no check. I I just I want you to say there is no check box cuz it keeps saying there's a check box there. There is no check box. I just to be clear. Do you see us going back and forth? There is no checkbox. And this is using GPT. You can use claw. Probably would clean this up a little quicker. A checkbox only Let's be clear what it is. So, just name it. Let's go named ranges. So, again, I I know you guys are like, why didn't you just do this in the first place? This

45:59wasn't the whole point. But now we're getting into some weeds. This is again us experimenting. And so here is this is supposed to be a button. This is supposed to be a button. Can you please fix the code and don't break or make any other updates or changes to functionality. So I'm just going to give it this code again. So it has it. Boom. We should we should get it. And as you can see, we just got a little bit more complicated in this. I do know how to use sheets. Yeah. But again, for the purpose of this, not not having not done this, I think this is a great example of like being a little frustrated with the tool and remembering it's only as good as you are in the questions that you're able to ask it or your understanding of it. Right? And

so we just want to add a helper. So now I think this is complete. You guys, this should be it. Leave the text as is. No checkbox needed. Type a prompt and input. Click once on the run box and your reply should appear. Fingers crossed that we got it. And let's continue to have a conversation. So, if this works, love y'all. Going to hit save. We're now at about 120 lines. I'm going to hit just run. It should execute because you got to save and then you got to run it here.

So, I'm going to come in here. Glad to hear you're doing well in Arizona. Let's position the text too for the sake of this conversation since we are there rather the bottom up. Let's position the text at the top. Let's make sure that it always wraps. And then I'm going to say no. My little and his buddies are mom got here and the kids are playing. I'm in here with you. I'm going to come down here.

48:08and still not doing it when I freaking hit the thing. This is annoying. It still didn't do it. I'm at 55 minutes freaking frustrated. Um, and it keeps doing that to me. I don't want it to keep coming in. So, I know it works. So, this is how I know it works. When I hit run, run. Um, I'm I prompt input, click once on the run box and reply. I just clicked on the run box and nothing happened. Let me hit refresh on this thing. We're just going to reload it.

We're going just Boom. Yep. So it looks like API error permissions are not sufficient to call URL fetch. So looks like we got this. Yep. Okay. So, it looks like we got that. And it looks like that is the error that we got. So, we're going to open that back up. I mean, we're working through this together, y'all. This is the life of like being an Imagineer and thinking through something that quite frankly all of us could benefit from. I'm just going to hit run again. We're going to review permissions because it looks like some things have changed.

gravy. We're going to come back in here. We're going to hit the good old refresher Rooney. Looks like Yep. I am okay. But okay, I will. Thanks for the conversation. I appreciate you in theory. um every time I got to do that. So then that means I have to come up here and I have to hit send. And so it it's running the script. You're welcome. So the run box is not working. So it does look like what we're trying to accomplish is working. Okay.

51:03Can we do this again? I don't I don't want all these places for all these different things. Doesn't make sense. I wanted to thing. Okay. So now, um, we're going to come back in here. We're going to come into Appcripts. So you're watching me open it up. We're going to hit control A. We're going to hit control C. Please update this script. Do you see how it remembers what to and how to do it? So, all the code is identical.

Everything else is fine. I think it's done. It doesn't appear to be done yet. So, it's not done. Reload the sheet. Authorize the prompt. Hit run in the merge cells and it should and the reply appears in the reply, but it keeps telling me this. So, what we're going to do is we're going to hit the boom diggity. We're going to hit say diggity. We're going to come over here. We're going to hit refresh diggity.

Before I leave, do you need anything? working. We got to solve this one. I clicked this box and it did not work. I still had to go to chat and select. And look at that. We even got a little beta test coming in for responses cuz it's got a sense of like we've been doing this. It's not solving the issue. I don't really care about the response to beful with you. Um, trying to trigger a network call from a simple on select trigger is blocked by Google security rules which is why it's not firing. So now clicking inside the run run chat fires. Um turn the run into a row button. No more code needed.

54:22Insert a button or drawing chat sheet. Insert drawing button in new UI. Type run and save. Assign the script to run chat and press okay. Position over instead of the old run cell block. So it's going to make me turn this into like um an actual uh button. So, I am gonna have to do that, you guys. Okay. Um, so we're gonna turn this into a button. We're gonna turn it into um an image. I believe oversells. I believe it is. Insert drawing. Insert button in new UI. Hold on. Let me just I'm going to shrink this. So, I'm going to insert drawing or insert button.

Okay. So, that is like a real button. So, I'm just going to hit delete. No, Z. So, I'm going to hit delete. So, it is an image. So, I'm going to shrink that down. close. There we go. This is for everybody. Type run and save. Click the drawing. Right click or click on the three dots. It says assign script. Enter. Run. chat. Okay, so that's that. Now, I'm gonna copy this new code or script. Sorry. So, I'm going to copy the new script, you guys. And we're going to go back to the app script. Okay. Could have saved some time. We're doing this. I'm going to hit save.

Okay, everyone's outside. I'm still doing this. And are you sure you don't need anything? So in theory what should happen based on this is I should hit this and it works. There you go. All right. So welcome to the master class. Welcome to We just created a a simple UI. Let's go ahead and work through this one more time. What we did was we created a ChatGPT and Google Sheets. You can do the same thing on a website, y'all. There's nothing else that you would need in order to make this happen, size an API key. I'm willing to give you an API key.

57:39What you'll need to do is make a copy of this document and or create it from scratch yourself. If you want to create your own, the instructions are in this video on how to do that. I'm also going to provide a summary from this and an output on what we did today. I'm going to post this on LinkedIn. It's going to be on YouTube. And happy days. Now you can turn this into a WordPress site. You can turn it into a Shopify site. You can add this feature and functionality to your business. And you can give add it to Slack. You can add it to whatever you're using for chat, Messenger, whatever. Basically, we just built GPT. All right, that's it. That simple.

I'm going to leave with I love you. Thank you so much for all you have given me and shared. you rock more than Ohio State. I hit enter, of course. One last tweak while we're at this, let's just go ahead and text wrap that. And from a formatting perspective, let's come on. Let's get this at the top. So, we don't like the black eyes. We're just going to hit run one more time.

Um, says, "Thank you. That's really kind of me to say. I'm glad I could help. I appreciate the love." Ohio State has definitely have a lot of pride. If you ever need anything else, enjoy your day. Go Blue. I love y'all. Go Cougs. Have the best day.

More videos

All videos → · Watch “Turning a Google Sheet into a Pocket‐GPT: Our 15‐Minute Build, 3‐Hour Debug, and 1‐Click Win” on YouTube ↗ · Subscribe on YouTube ↗