Spreadsheet's Birthday

Discover how to create a fun automation in Google Sheets that celebrates your spreadsheet's birthday with a toast! This video guides you through building a function using Apps Script to determine when your spreadsheet was created and notify you on its birthday.

Do you know your spreadsheet 's birthday? Maybe your spreadsheet knows its own birthday. This is Sheet Fools . We're creating 24 automations that are going to wreak havoc on your sheet. Well, not on your sheet. In your sheet to your colleagues, to your bosses, to your friends, family. Might have some random chaos, some interesting sheet aesthetics, some text manipulation. Right now we're gonna create a function that's gonna find out when is the sheet spreadsheet 's birthday. We're gonna go up to Extensions app script . We have a bunch of awesome automations here already. These are available, by the way, for free copy paste. Put 'em in your Google Drive [email protected] slash sheet fools . Download it today. It's absolutely free. $0, go get it. We're gonna create a couple of functions because we need to know is today my birthday?

And again, it's this spreadsheet 's birthday, not your birthday. And we're gonna say variable today equals new date. Get date. Just getting the date of today. If today is equal to get spreadsheet , birthday, get date. And if that's true, we're going to say spreadsheet app. That get active toast. Happy birthday to me. Let's get some cake there. So we will have to be active. But here you can send yourself an email from your sheet. You could do lots of cool things. Check those kinds of automations, like sending emails over at better sheets on YouTube here on better sheets on YouTube. But right now we're just going to do a little bit of a toast here to say, is today my birthday? But we need this get spreadsheet birthday function . So we're gonna go create that as well.

Function , get spreadsheet , birthday. Now we need to know what spreadsheet are we in. So, variable file id , it's equal to spreadsheet app dot get active spreadsheet , get id variable File equals drive app, get file id . The issue here is that we need file ID right there, uh, because Drive app gets us the actual created date. Spreadsheet app does not have it. So our variable created date is equal to file dot get date created. Very simple, right? Return, create a date. So now this function is just saying what day is our spreadsheets birthday? This other function is today. My birthday is saying, Hey, are these two things the same? And if so, happy birthday to me. Well, to test this out.

This particular spreadsheet is not created today. We know that because we can say else, logger dot log, not my birthday. So command S and save and let's run. Is today my birthday? Run it. You may have to. Review permissions to run it. And today's, sorry, not my spreadsheet 's birthday, but let's create a new sheet. Sheet new. This one I just made now. Extensions app script . I'm gonna paste. My app script here, so we are running the exact same function . Let's run. Is today my birthday, click run. And yes, it says happy birthday to me. So really cool. This is working. Let's go to our app script and set this to run every single day. Over on triggers on the left side. Click there. We already have a trigger .

Where did my row go again? If you wanna get the other automations, go to better sheets. Co slash sheet fools . That one. If you remove a row, it will say, where did, where did my row go? What did you do in my row? Okay, for now, let's add a trigger . Choose which function to run. Get sheep birthday. It's actually is today. My birthday is the function we wanna run. Event source is gonna be time driven. We're gonna run this every single day, daytimer, and we're gonna do it while we're working. Maybe we are work from. 10 to 11 or nine to 10 maybe. Wherever our day, we know we're gonna be in sheets. Save. Again, this can be manipulated and edited if you want to send an email or do something more permanent. This is just gonna give us a little bit of a message in here. If you want to edit this, go do triggers. Click on the edit button, the little pencil icon, and you can

edit this as much as you want. If you want to have a different action, go to our editor . And just go right here. Do a different action. Maybe it puts it somewhere inside the sheet, it adds some message to a header or something. Check out all of that, and if you want to do any of that, you can learn it here on YouTube on Better Sheets. Subscribe today. Get all of these cool automations. All these videos have been awesome. We've made 24 of them. They are all available at Better Sheets. DACO slash Sheet Fools . I'm so excited you're watching this. I love it. I love spreadsheets, and I hope you do too, and I hope you learn to love spreadsheets as much as I do.