{"id":13433794,"url":"https://github.com/labnol/apps-script-starter","last_synced_at":"2025-05-15T14:07:02.776Z","repository":{"id":40827577,"uuid":"137205930","full_name":"labnol/apps-script-starter","owner":"labnol","description":"Setup a local development environment inside Visual Studio Code and build Google Workspace add-ons with Google Apps Script","archived":false,"fork":false,"pushed_at":"2025-04-30T19:36:34.000Z","size":3743,"stargazers_count":1147,"open_issues_count":2,"forks_count":189,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-05-15T14:06:51.884Z","etag":null,"topics":["gmail","google-apps-script","google-sheets","google-workspace"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=KxdCIbeO4Uk","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labnol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-13T11:25:03.000Z","updated_at":"2025-05-14T22:15:21.000Z","dependencies_parsed_at":"2024-07-10T09:39:27.435Z","dependency_job_id":"d5590d87-d34c-47a9-9866-1de1ac5b7ba4","html_url":"https://github.com/labnol/apps-script-starter","commit_stats":{"total_commits":192,"total_committers":11,"mean_commits":"17.454545454545453","dds":"0.22395833333333337","last_synced_commit":"e47451ddbe174954e36f6e5771f01921dc225865"},"previous_names":[],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labnol%2Fapps-script-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labnol%2Fapps-script-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labnol%2Fapps-script-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labnol%2Fapps-script-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labnol","download_url":"https://codeload.github.com/labnol/apps-script-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gmail","google-apps-script","google-sheets","google-workspace"],"created_at":"2024-07-31T02:01:36.332Z","updated_at":"2025-05-15T14:06:57.767Z","avatar_url":"https://github.com/labnol.png","language":"JavaScript","readme":"# Google Apps Script Development 💯\n\n![Google Apps Script Development with ES6](images/google-apps-script-development.png)\n\nPlease follow the 👉 **[step-by-step video tutorial](https://www.youtube.com/watch?v=KxdCIbeO4Uk)** 👈 for quickly getting started with Apps Script development inside Visual Studio Code. It is recommended that you install the [Extension Pack](https://marketplace.visualstudio.com/items?itemName=labnol.google-apps-script) for working with Apps Script files in VS Code.\n\nYou can build Google Workspace add-ons (for Google Docs, Slides, Gmail and Google Sheets), web applications and workflow automation routines with next-generation JavaScript.\n\nThe starter kit is used by [Digital Inspiration](https://digitalinspiration.com/) for building popular Google add-ons including [Gmail Mail Merge](https://workspace.google.com/marketplace/app/mail_merge_with_attachments/223404411203), [Google Forms Notifications](https://workspace.google.com/marketplace/app/email_notifications_for_google_forms/984866591130) and [Document Studio](https://workspace.google.com/marketplace/app/document_studio/429444628321).\n\n## Build with Google Apps Script 🚀\n\nSetting up a modern development environment for building [Google Apps Script](https://www.labnol.org/topic/google-apps-script/) projects is easy and quick (**[video tutorial](https://www.youtube.com/watch?v=KxdCIbeO4Uk)**).\n\nYou also need to install Node.js which includes the npm package manager.\n\n### :package: Getting Started\n\n**1.** Clone the repository and install npm dependencies and [utilities](TOOLS.md).\n\n```\nnpx degit labnol/apps-script-starter my-project\ncd my-project\nnpm install\n```\n\n**2.** Log in to Google clasp and authorize using your Google account.\n\n```\nnpx clasp login\n```\n\n**3.** Create a new Google Script bound to a Google Sheet (or set the type as standalone to create a standalone script in your Google Drive)\n\n```\nnpx clasp create --type sheets --title \"My Apps Script Project\" --rootDir ./dist\n```\n\n**4.** Include the necessary [OAuth Scopes](./scopes.md) in the [appsscript.json](./appsscript.json) file\n\n**5.** Deploy the project\n\n```\nnpm run deploy\n```\n\nThe `dist` directory contains the bundled code that is pushed to Google Apps Script.\n\n![Google Apps Script - Setup Development Environment](images/npm-install.gif)\n\n### The .claspignore file\n\nThe `.claspignore` file allows you to specify file and directories that you do not wish to upload to your Google Apps Script project via `clasp push`.\n\nThe default `.claspignore` file in the Apps Script Starter kit will push all the JS and HTML inside the `rootDir` folder and ignore all the other files.\n\n## :beginner: Using Git with Google Apps Script\n\n![Google Apps Script - Github](images/github-apps-script.png)\n\nCreate a new repository in Github and make a note of the URL of the new repository. Next, open the terminal and run the above commands to push your Apps Script project to Github.\n\n## Custom Google Sheet functions\n\nPlease read [the tutorial](./FUNCTIONS.md) on how to write custom functions for Google Sheets using Apps Script.\n\n## Testing your Google Apps Script code\n\nYou can run tests with jest using\n\n```\nnpm run test\n```\n\nThis has limitations:\n\n- You _can_ test code that has no dependencies to Google App Script code, e.g.\n\n```\nconst hasCpuTime = () =\u003e !(Date.now() - START_TIME \u003e ONE_MINUTE * 4);\n\n```\n\n- You _can not_ test code that has dependencies to Google App Script code, e.g.\n\n```\nfunction notTestable() {\n    Logger.log(\"notTestable\"); // \u003c-- Google Apps Script function. Not callable in dev\n    SpreadsheetApp.getUi(); // \u003c-- Google Apps Script function. Not callable in dev\n    ...\n}\n```\n\nCheck out [jest 'expects' here](https://jestjs.io/docs/expect)\n\n## :fire: Meet the Developer\n\n\u003cimg align=\"left\" width=\"100\" height=\"100\" src=\"https://pbs.twimg.com/profile_images/1320276905271070727/zQUrdqxO_200x200.jpg\"\u003e\n\n[Amit Agarwal](https://www.labnol.org/about) is a web geek, Google Developers Expert (Google Workspace, Google Apps Script), Google Cloud Innovator, and author of [labnol.org](https://www.labnol.org/), a popular tech how-to website.\n\nHe frequently uses [Google Apps Script](https://www.labnol.org/topic/google-apps-script/) to automate workflows and enhance productivity. Reach him on [Twitter](https://twitter.com/labnol) or email `amit@labnol.org`\n\n### :cherry_blossom: Contribution\n\nContributions and feature requests are welcome. If you are using the Google Apps Script starter package and fixed a bug for yourself, please consider submitting a PR!\n\n### :lock: License\n\n[MIT License](https://github.com/labnol/apps-script-starter/blob/master/LICENSE) (c) [Amit Agarwal](https://www.labnol.org/about/)\n","funding_links":[],"categories":["JavaScript","2. Development","Development"],"sub_categories":["2.1. Starter Kits","Starter Kits"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabnol%2Fapps-script-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabnol%2Fapps-script-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabnol%2Fapps-script-starter/lists"}