Insert Row Daily Automatically

Learn how to automatically insert a new row daily in Google Sheets using Apps Script, ensuring your task list stays fresh and formatted correctly without manual effort.

we have a list of tasks and we want to insert a row every day so that we have a fresh row with all of this formatting here. Now, if we insert a row after one, we're going to get exactly the format of that first row. So we need to go to the second row and insert one above, but we don't wanna have to do that every day. We want it there for us when we start our work. So I'm gonna show you how to do that. It's very simple. Go to Extensions app script . Here we have a function called My Function . This is already pre-written for us. We're gonna change this to insert row daily. And we're gonna start with Spreadsheet app. This is Capital S, capital A. This is a function that exists inside of App Script. All we have to do is type it and use it. Spreadsheet app dot get active spreadsheet.

And we're gonna have to add these parentheses if you're using the auto complete. Or you can type it by hand, but make sure it has a capital A and capital S. Get sheet by name again with the parentheses insert row before. Now again, I want to mention we don't use after, in this particular case because we do not want the formatting of the header to be in that second row. We want the formatting of whatever is in the second row now. So we don't use insert row after we use it before, and all we have to do is enter the integer two. Now look at that. That's one line of code four functions all together with these dot notations. So we go deeper and deeper. We need to make sure we have the actual name of the sheet that's

going to be tasks with a capital T. Make sure it is the correct capitalization. We're gonna save this. We're going to hit run. Make sure you have insert row . Daily is selected here. If you have multiple functions , you'll have a dropdown menu of all those functions . Click Run. You may have to authorize it. Authorize it the very first time you've run it. Let's go back to our sheet and there it is. There is our row already waiting for us, but we don't wanna have to come in here and click run each time we wanna do this. We want this done for us. So in our app script , go over to the left side and click on triggers. Once that loads over on the bottom right click add trigger , choose which function to run. Again, if you have multiple functions written, you'll have multiple here to select from, but we're just gonna select insert row daily, select events sourced.

That's going to be time driven. Let's change that now. Once we do that, we have some other options we can. Do a Daytimer. That's every single day. Now we're gonna select the time of day. I'm gonna actually do it right before I come to work, four to 5:00 AM Click save. Now we have a trigger that's going to run once a day every day. And if there's some errors or anything, we can come and check it. If we wanna edit it, change the time. We can come here, click the pencil icon or edit trigger . We can edit it if we want a different time. Click save, or we can delete this trigger . Go over to the right side, three buttons, click delete trigger . That's really important. In case we want this to stop happening, click delete forever. And there, that's how to insert a row every single day that actually has the, we

have in your sheet, not the header format . Hope you enjoyed that. You are watching better sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But for right now, right here, one of these videos is gonna be your next Google sheet.