How to track Google Sheets that were shared to you
Create a Google Sheet
with the following column headers from A1
to E1
.
- shared_by
- filename
- url
- email_date
- created_at
Click Extensions
> Apps Script
.
You will see a screen like this. This is a Code.gs
file where we can put Apps Script
codes.
Copy this Code.gs
file and paste it to replace everything in your Code.gs
.
Your Code.gs
file will now look something like this.
Click save.
Take note that this script is set up to run once a day at 8am (not exact time, may vary). Change it accordingly. If you want, for example, to run it every 2pm, change the 8
to 14
.
Click the dropdown then click initialize
.
Click Run
.
When prompted for Authorization required
, click Review permissions
.
Login to your Google account. Take note that the title of your Apps Script
project will show here.
Click Advanced
.
Click Go to <project-name> (unsafe)
.
Take note that the above is fine even if it says not verified or unsafe
. It’s your apps script, so it’s fine.
Read the permissions that you will allow (might not be the same as the screenshot) before proceeding. Then click Allow
.
At the bottom of the screen, wait for the execution to complete.
On the left side, click Triggers
.
You should see these triggers.
The Google Sheet
you created will be updated on the next 8am, or whatever time you updated it to. Below image is just a sample (not 8am though).