Unpacked Chrome Extension that injects a random quote from a user specified Google Sheet into a Gmail Composer.
Date: 2/06/2023
- Updated to V3 Chrome Manifest
- Added a Text settings page with font selection, font size and font color
- Changes once saved are applied immediately
- Left Aligned elements on the Text Settings Page
- Download the repository to a suitable location on your computer
- Go to console.cloud.google.com
- In the Project Selector Drop down, create a new project with a name like "Gmail Quote Injector"
- Click into Enabled APIs and Services and click Enable APIs and Services > Search for Sheets > Enable Sheets API
- Go to chrome://extensions > toggle Developer Mode ON > Load Unpacked and select the folder containing the extension
- Click on Detail (of the Extension) > Copy the ID and keep handy
- Go back to the Google API Console > click on OAuth Consent Screen > User Type External > Create > Give the App a Name > Your Email for user support > Your email address again for Dev Contact Info > Save and Continue > Add or Remove Scopes > Manually Paste the Following Scope https://www.googleapis.com/auth/spreadsheets.readonly > Add to Table > Update > Save and Continue > Test Users > Your Email > Save and Continue > Back to Dashboard Click on Credentials > Create Credentials > OAuth Client ID > Application Type: Chrome Extension > Paste ID from step 6 into ITEM ID field. Give client a name and click CREATE > Copy the Client ID and paste into manifest.json where indicated.
- Go to sheets.google.com > new
- Add as many quotes as you like to a column, eg. A. The first row is ignored, so add headers or leave blank
- Publish your sheet, and grab the SheetID. Look at the URL to find the SheetID > Keep Handy along with the Column containing the quotes.
- Click on Extensions (Puzzle Piece) > Pin the Extension
- Click the Extension Icon > click the link for Extension options Page > Enter your Sheet ID and your Rang
- eg. if your quotes are from A2 - A200 then enter A2:A200. If your quotes are on Column A and you keep adding them, then enter A:A and it will automatically set the range. You can even select a range such as A1:D100 as per your requirements
- Click Save
- Click the Extension Again and click Refresh Quotes
- To use the Extension, simply login to your Gmail > click Compose and a random quote from your sheet will be pasted into the email composer.
- Open chrome://extensions > Locate the Extension > click on Background Page to open the Extension Dev Tools
- Note the error and either google search or reach out for assistance. Include screenshots of the error.
- Under Errors, you may see a warning about Manifest V2 Deprication, this does not interfere with the extension's functionality.