Skip to content

Installation

Craig M. Rosenblum edited this page Jul 26, 2023 · 1 revision

These are the steps to install this script, and allow it to start automatic blocking your spam.

At any time, if there are domains or email addresses you wish to unblock, go to Gmail settings -> Filters and delete that filter.

  1. Login with Google Account
  2. Go to Google App Scripts Home Page - https://script.google.com/home
  3. Create a New Project called CreateSpamDomainFilter
  4. Copy N Paste the script from this github into the editor.
  5. Save the Project File
  6. Add Gmail Services to this project
  7. Click on Triggers on the left side
  8. Click Add Trigger, and specify how often you want this script to run
  9. Save Project File Again

Try to run the project, at this time, it may ask for permissions for this script to access your Google Account.

Run it successfully once manually, by clicking the Run Button.

Once it successfully completes running, verify by checking your Gmail Spam Folder, then Trash Folder, and verify all filters in settings.

All spam once it creates the filter to automatically block future emails from that email address or domain name. Will show up in your list of Active Filters. You can easily delete any of them if they are invalid.

Over time, depending how often you run the script, which it will do automatically, based your Trigger settings. You will find that you have less and less spam.

Thank you.

Craig M. Rosenblum

Clone this wiki locally