Monthly Archives: April 2019

Automatically Empty Google Drive Trash

Want to empty your Google Drive Trash automatically?  I finally have the solution for you.

  1. Make sure you are signed into your Google account.
  2. You should OBVIOUSLY have Google Drive account up and running since that’s why you’re here, right?
  3. Go here
  4. Click NEW SCRIPT
  5. Paste in this code (exactly)
    function createTimeDrivenTriggers() {

    function emptyThrash()

  6. Click the Save Icon
  7. Enter a name such as “Automatically Empty Google Drive Trash”
  8. Click the “Resources -> Advanced Google Services” menu within the Code editor
  9.  Scroll down and turn “Drive API” to “ON”
  10. You should see a message “These services must also be enabled in the Google Cloud Platform API Dashboard”.  Click that link.
  12. Locate “Google Drive API” and click it.
  13. Click Enable
  14. Go back to your browser window with the “Advanced Google Services” window still open.
  15. Click OK
  16. Click the “Run” icon within the project editor
  17. You should see “Authorization Required”.  Click Review Permissions
  18. Choose your google account (this links up the script with the proper account).
  19. You will see “This app isn’t verified”.  Click Advanced. Click Go to XXXX Project (unsafe).
  20. Click ALLOW
  21. Save your project again.
  22. Go to “Run->Run Function->createTimeDrivenTriggers”
  23. Hit the “Timer” icon.
  24. You should see your project listed under “Triggers”
  25. Your job is now scheduled to run every 1 hour and empty your trash!


This process was crafted by deciphering the following two pages: