I'm trying to find out if it's possible to fetch the date a URL was last updated. So column A I'd have the URL and column B the data would auto generate. I'm guessing this would be done using some sort of script, but I don't know where to start. Googling isn't helping much.
Google-sheets – How to auto generate the date a URL was last updated
google sheets
Related Topic
- Google-sheets – How to show “Last edited” date and user on Google Sheets
- Google Sheets – Auto Insert Column with Today’s Date
- Google Sheets – Last Modified Date of Files in Google Drive Folder
- Google-sheets – getValue for the previous non empty cell in a column based on getRow value
- Google-sheets – Auto-fill date function changes the YEAR and not the day
- Google-sheets – How to make a cell autopopulate the date dependent on another cell
- Google-sheets – Google sheets join arrays
Best Answer
Yes, this can be done with a script. Keep in mind that Google services are subject to various quotas; if you ask it to do too much, it may well refuse. How much is too much depends on circumstances: e.g., if some of the websites take a long time to reach, the script may have problems with maximum execution time (6 minutes).
Here is the script. It takes URLs from the column A of the active sheet, and records the "Last-Modified" date returned by the server in the B column. Each URL is tested for having
http
at the beginning, to avoid making weird fetch calls when the column happens to contain something else.To refresh the data periodically, you may want to run the script daily with a trigger.
Sample output: