Chrome History to Google Sheets
This repository contains all the code you need to start programmatically exporting your browsing history to a Google Sheet.
The reason I created this was to easily serve an API of this data for my site where I'm running a social experiment, publicly sharing my browsing for a month.
To create an API from Google Sheets I'm using Sheety.
This script runs every hour.
Clone this repository
Create a .env file like the .env.example and fill in the following data:
Write the Document ID of the Google Sheet you want to use in SHEET.
Head to Google Developers Console and create a new project (or select the one you have.)
Under “API & auth”, in the API enable “Drive API”.
- Go to “Credentials” and choose “New Credentials > Service Account Key”.
It will download a .json file.
Put that .json file inside of the folder with this code.
Replace CREDENTIALS in the .env file with the name of the file you downloaded:
5) Open the .json and copy the `client_email` field: `"client_email": "firstname.lastname@example.org"` 6) Go to your Google Sheet and share it with editing permissions to that email.
And there you go! Visit the google doc you linked and it will contain all your browsing history.