Chrome extension for capturing B&H and Amazon product details and appending them to Google Sheets through a Google Apps Script web app.
- Manifest V3 Chrome extension
- Popup-driven capture on B&H and Amazon product detail pages
- Multiple spreadsheet destinations with one default destination
- Configurable header-name mappings per destination
- Quantity and notes fields before save
- Apps Script backend that appends rows by matching header names
public/manifest.json Chrome extension manifest
src/background/index.ts Service worker that writes to Apps Script
src/content/bh-product.ts B&H product scraper content script
src/popup/ Popup UI
src/options/ Options UI
src/shared/ Shared types and helpers
apps-script/Code.gs Apps Script backend
npm install
npm run build
npm testThe built extension will be in dist/.
- Open
chrome://extensions. - Turn on Developer mode.
- Click Load unpacked.
- Select the
dist/folder from this repo.
The extension defines a default shortcut of Alt+Shift+Q to open the popup. You can change it in chrome://extensions/shortcuts.
- Create a standalone Google Apps Script project.
- Copy the contents of apps-script/Code.gs into the script project.
- In Apps Script, set a script property named
QUOTE_BUILDER_SECRETto your shared secret. - Deploy the script as a web app.
- Copy the deployment URL.
Notes:
- Apps Script web apps do not expose custom request headers in
doPost(e), so the extension includes the shared secret in the JSON body for validation. - The extension still sends the
X-Quote-Builder-Secretheader for consistency with the planned transport contract.
- Open the extension Options page.
- Paste the Apps Script web app URL.
- Enter the shared secret.
- Add one or more destinations:
- destination label
- spreadsheet URL or raw spreadsheet ID
- tab name
- header names for any fields you want to save
- optional required/optional toggle per field
- available fields:
source,vendor,title,price,url,timestamp,quantity,notes
- Mark one destination as default.
The Apps Script appends rows by matching the configured header names in the first row of the target tab. Any mapped field can be marked required or optional. Available fields:
sourcevendortitlepriceurltimestampquantitynotes
- Build the extension and load
dist/unpacked in Chrome. - Configure Apps Script settings and at least one destination.
- Open a B&H or Amazon product detail page.
- Open the popup and confirm title, price, and canonical URL preview.
- Save with quantity and notes.
- Confirm the row appears in the expected Google Sheet tab.
- Add a second destination and confirm destination switching works in the popup.
- Test an invalid mapping and confirm the error returns from Apps Script.
