Gmail: save vendor mail into your Quotebook Inbox

About 10 minutes, once. A short script in your own Google account saves every email from your vendors' domains into a Google Drive folder. Quotebook reads that folder on your PC. The script sends nothing anywhere, and Quotebook's servers never see your mail.

1. Add the script

  1. Open script.google.com and choose New project. Name it Quotebook Inbox.
  2. Replace everything in the editor with the contents of quotebook-gmail.gs.
  3. Save. There is nothing to edit: the script reads your vendors' domains from the file quotebook-vendors.txt that Quotebook keeps in the folder.

2. Run it once

  1. Choose the function setup and press Run.
  2. Google asks you to authorise the script. It asks for Gmail and Drive access because Google's script tools offer only full access; the code only reads vendor mail and writes into the one folder. On a personal Gmail account Google warns that the app is unverified, because you wrote it yourself: choose Advanced → Go to Quotebook Inbox.
  3. The log says No vendor domains yet this first time. That is expected: the script has made the folder, and Quotebook writes your vendors' domains into it in step 4. From then on it saves new vendor mail every 15 minutes.

3. Put the folder on your PC

  1. Install Google Drive for desktop if you do not have it, and sign in.
  2. In its settings, choose Mirror files for My Drive (not Stream), so the folder is on your disk.

4. Point Quotebook at the folder

  1. Open Quotebook in Chrome or Edge, go to Mail sync and choose Choose folder. Pick Quotebook Inbox inside your Google Drive folder.
  2. When Chrome or Edge asks, choose Allow on every visit, or install Quotebook as an app to keep the permission.
  3. Add each vendor's domain to a part in a project. Quotebook writes them to quotebook-vendors.txt in the folder, and Google Drive for desktop uploads that file within a minute or two.

5. Bring in past mail

  1. Once your vendors are in Quotebook, go back to the script, choose the function backfill and press Run. It saves up to a year of mail from those vendors.
  2. A run stops after about five minutes. If its log ends with run backfill again, run it again; it carries on where it stopped. It is finished when the log says All past mail checked.
  3. Run backfill again whenever you add a vendor whose past mail you want.
In a company Google Workspace, an administrator can turn scripts off or block their Gmail access. If Run says the app is blocked, show that message to your administrator, along with Quotebook's guide for IT.