Paste the following code into the window:Ĭonst ss = SpreadsheetApp.getActiveSpreadsheet() Ĭonst url = sheet.getRange('Sheet1!A1').getValue() Ĭonst follower_count = sheet.getRange('Sheet1!B1').getValue() Ĭonst date = sheet.getRange('Sheet1!C1').getValue().Remove the existing code in the main window (the bit of code: function myFunction() ). Type headings into row 4, as shown in this image:.Assume you have data in A1 and B1, put the formula =now() into cell C1, to give us our timestamp.Second, we’ll look at setting up an automatic trigger to do this for us at set intervals (e.g. In other words, it changes daily and we want to record a snapshot in time.įirst, let’s add a custom menu to Google Sheets which saves the current number of followers plus a timestamp in the rows below. Maybe we enter the data manually, or better collect it automatically via Zapier or even via the API with Apps Script. Here’s our scenario: imagine we’re tracking a social media channel, for example, the number of followers of a Reddit group. We use Apps Script to save the data and set it to run automatically in the background.Ĭreating a Save Data function with Google Apps Script In this post, you’ll learn how to save the data in Google Sheets with timestamps, so that you have a record of the data at set time intervals (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |