Skip to content

overstory/gappscript-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Apps Script Playground

Useful links

  • Advanced development process with apps [link]
  • Gapps [link]
  • Google Credentials [link]

Instructions

  1. Start with a generic Gradle/Angular project
  2. npm install install all required dependancies
  3. Create a new Dev Console Project
  4. Use this link to create the project. It will auto-activate the Google Drive API.
  5. Make sure Create a New Project is selected and hit Continue.
  6. Once the project has been created, click Go to Credentials.
  7. Acquire Google Drive Client Secret Credentials
  8. Select Add credentials, choose the OAuth 2.0 client ID type
  9. Click Configure Consent Screen.
  10. Select your email address from the dropdown and assign your add-on a Project Name.
  11. Save your Consent Screen
  12. In the menu that appears, choose Other for the Application type.
  13. Give it any name you like and click Create.
  14. Finally, download your credentials using the Download as JSON button to the right.
  15. Authenticate gapps
  16. Run ./bin/gapps.sh auth path/to/client_secret_abcd.json
  17. Follow the directions by clicking on the link generated by the script. You can pass the option --no-launch-browser to generate a url that will give you a code to paste back into the console. This is useful if you're using ssh to develop.
  18. Initialise project
  19. Head to https://script.google.com and create a new blank project.
  20. Save the mostly empty project and give it a name.
  21. Saving is important; the project is not in your Google Drive until it is saved.
  22. Get your project ID from the address bar, located after /d/ and before /edit. For example, '//script.google.com/a/google.com/d/abc123-xyz098/edit?usp=drive_web'
  23. Navigate to a directory where your Apps Script project will live
  24. Run ./bin/gapps init <fileId> within your project directory.
  25. Develop GApps scripts
  26. Run Gradle's other/gappsPush task to push changes onto Google Apps

Lessons learnt

  • The instructions suggest installing the gapps globally (i.e. using -g flag). This is totally fine for development purposes on one machine but having clearly controlled development environment may prove difficult with global approach. A better choice is to call the gapps using a symlink within the project’s scope.
  • Upload command takes all *.html & *.gs files and then uploads onto the cloud at the projects level where gapps init was run.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages