You can use this source code as plug n' play code in your Apps Script project. The only thing you'll have to change to had it work for you is what's found in the getSettings() function, within the return statement.

Great for people who are familiar with Javascript and Google Apps Script

Want a Demo? Check out this video: https://youtu.be/bf8oEvLDa7o