Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, ...
#4: Post edited
- As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, Google Drive files, etc. and also to certain elements that can't be accessed through one of the Google APIs. It offers a web-based IDE and has its own API.
- The Google Apps Script API docs include a quickstart section, having subsections for different languages / platforms including JavaScript.
- I thoroughly reviewed the quickstart overview and the JavaScript subsection and got it to work, but when trying the "How too... Execute a function" I got stuck; more specifically, I'm getting 404 errors.
- References:
- - Google Apps Script REST API overview page: https://developers.google.com/apps-script/api/concepts.
- - JavaScript quickstart instructions: https://developers.google.com/apps-script/api/quickstart/js
- - The How To... Execute a function: https://developers.google.com/apps-script/api/quickstart/target-script
- This is my environment:
- - Google Workspace account. I'm the domain administrator.
- - New Google Cloud project, created following the quickstart instructions
- - New Google Apps Script project, created using the quickstart instructions
- Hardware and Installed Software
- - Mac Mini Apple M1, MacOS Ventura 13.4.1.
- - Google Chrome
- - Visual Studio Code
- ----
- Steps to reproduce the problem
- 1. Read the links included above.
- 1. Create the target script.
- 2. Create the file from the JavaScript quickstart. Default name `index.html`.
- 3. Create the file from the How to... Execute function. Default name index.js
- 4. Modify `index.html` to load `index.js`.
- 5. Modify `index.html` in such a way that instead of calling ` createScript()` call `callScriptFunction()`.
- 6. Create the Google Cloud standard project.
- 7. Enable the Apps Script API.
- 8. In the API section of the Cloud project, go to credentials.
- 9. Add the ApiKey. Take note of it.
- 9. Add the Web client
- 10. Add the allowed URI. If you will run this locally add `http://localhost:8080`.
- 11. Create the OAuth consent screen
- 12. Grab the Google Cloud project id and add it to the Google Apps Script project on Project settings.
- 13. Deploy Google Apps Script as API executable
- 14. Get the script Id.
- 15. Add the ApiKey, Client Id to the `index.html` file.
- 16. Add the script Id to the `index.js` file.
- 17. Open `index.html` using Google Chrome.
- 18. Click the button Authorize and follow the OAuth authorization flow.
18. Open the Google Chrome DevTools Console- Here you will find the error message.
- As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, Google Drive files, etc. and also to certain elements that can't be accessed through one of the Google APIs. It offers a web-based IDE and has its own API.
- The Google Apps Script API docs include a quickstart section, having subsections for different languages / platforms including JavaScript.
- I thoroughly reviewed the quickstart overview and the JavaScript subsection and got it to work, but when trying the "How too... Execute a function" I got stuck; more specifically, I'm getting 404 errors.
- References:
- - Google Apps Script REST API overview page: https://developers.google.com/apps-script/api/concepts.
- - JavaScript quickstart instructions: https://developers.google.com/apps-script/api/quickstart/js
- - The How To... Execute a function: https://developers.google.com/apps-script/api/quickstart/target-script
- This is my environment:
- - Google Workspace account. I'm the domain administrator.
- - New Google Cloud project, created following the quickstart instructions
- - New Google Apps Script project, created using the quickstart instructions
- Hardware and Installed Software
- - Mac Mini Apple M1, MacOS Ventura 13.4.1.
- - Google Chrome
- - Visual Studio Code
- ----
- Steps to reproduce the problem
- 1. Read the links included above.
- 1. Create the target script.
- 2. Create the file from the JavaScript quickstart. Default name `index.html`.
- 3. Create the file from the How to... Execute function. Default name index.js
- 4. Modify `index.html` to load `index.js`.
- 5. Modify `index.html` in such a way that instead of calling ` createScript()` call `callScriptFunction()`.
- 6. Create the Google Cloud standard project.
- 7. Enable the Apps Script API.
- 8. In the API section of the Cloud project, go to credentials.
- 9. Add the ApiKey. Take note of it.
- 9. Add the Web client
- 10. Add the allowed URI. If you will run this locally add `http://localhost:8080`.
- 11. Create the OAuth consent screen
- 12. Grab the Google Cloud project id and add it to the Google Apps Script project on Project settings.
- 13. Deploy Google Apps Script as API executable
- 14. Get the script Id.
- 15. Add the ApiKey, Client Id to the `index.html` file.
- 16. Add the script Id to the `index.js` file.
- 17. Open `index.html` using Google Chrome.
- 18. Click the button Authorize and follow the OAuth authorization flow.
- 18. Open the Google Chrome DevTools Console.
- Here you will find the error message.
#3: Post edited
- As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, Google Drive files, etc. and also to certain elements that can't be accessed through one of the Google APIs. It offers a web-based IDE and has its own API.
- The Google Apps Script API docs include a quickstart section, having subsections for different languages / platforms including JavaScript.
- I thoroughly reviewed the quickstart overview and the JavaScript subsection and got it to work, but when trying the "How too... Execute a function" I got stuck; more specifically, I'm getting 404 errors.
- References:
- - Google Apps Script REST API overview page: https://developers.google.com/apps-script/api/concepts.
- - JavaScript quickstart instructions: https://developers.google.com/apps-script/api/quickstart/js
- - The How To... Execute a function: https://developers.google.com/apps-script/api/quickstart/target-script
- This is my environment:
- - Google Workspace account. I'm the domain administrator.
- - New Google Cloud project, created following the quickstart instructions
- - New Google Apps Script project, created using the quickstart instructions
- Hardware and Installed Software
- - Mac Mini Apple M1, MacOS Ventura 13.4.1.
- - Google Chrome
- - Visual Studio Code
- As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, Google Drive files, etc. and also to certain elements that can't be accessed through one of the Google APIs. It offers a web-based IDE and has its own API.
- The Google Apps Script API docs include a quickstart section, having subsections for different languages / platforms including JavaScript.
- I thoroughly reviewed the quickstart overview and the JavaScript subsection and got it to work, but when trying the "How too... Execute a function" I got stuck; more specifically, I'm getting 404 errors.
- References:
- - Google Apps Script REST API overview page: https://developers.google.com/apps-script/api/concepts.
- - JavaScript quickstart instructions: https://developers.google.com/apps-script/api/quickstart/js
- - The How To... Execute a function: https://developers.google.com/apps-script/api/quickstart/target-script
- This is my environment:
- - Google Workspace account. I'm the domain administrator.
- - New Google Cloud project, created following the quickstart instructions
- - New Google Apps Script project, created using the quickstart instructions
- Hardware and Installed Software
- - Mac Mini Apple M1, MacOS Ventura 13.4.1.
- - Google Chrome
- - Visual Studio Code
- ----
- Steps to reproduce the problem
- 1. Read the links included above.
- 1. Create the target script.
- 2. Create the file from the JavaScript quickstart. Default name `index.html`.
- 3. Create the file from the How to... Execute function. Default name index.js
- 4. Modify `index.html` to load `index.js`.
- 5. Modify `index.html` in such a way that instead of calling ` createScript()` call `callScriptFunction()`.
- 6. Create the Google Cloud standard project.
- 7. Enable the Apps Script API.
- 8. In the API section of the Cloud project, go to credentials.
- 9. Add the ApiKey. Take note of it.
- 9. Add the Web client
- 10. Add the allowed URI. If you will run this locally add `http://localhost:8080`.
- 11. Create the OAuth consent screen
- 12. Grab the Google Cloud project id and add it to the Google Apps Script project on Project settings.
- 13. Deploy Google Apps Script as API executable
- 14. Get the script Id.
- 15. Add the ApiKey, Client Id to the `index.html` file.
- 16. Add the script Id to the `index.js` file.
- 17. Open `index.html` using Google Chrome.
- 18. Click the button Authorize and follow the OAuth authorization flow.
- 18. Open the Google Chrome DevTools Console
- Here you will find the error message.
#2: Post edited
Problems with Google Apps Script API JavaScript "How to... Execute function" (to be self-answered)
- Problems with Google Apps Script API JavaScript "How to... Execute function"
#1: Initial revision
Problems with Google Apps Script API JavaScript "How to... Execute function" (to be self-answered)
As this is the first question about Google Apps Script, here is a very brief description: it is a platform that helps people easily get programmatic access to Google apps data like Gmail messages, Google Drive files, etc. and also to certain elements that can't be accessed through one of the Google APIs. It offers a web-based IDE and has its own API. The Google Apps Script API docs include a quickstart section, having subsections for different languages / platforms including JavaScript. I thoroughly reviewed the quickstart overview and the JavaScript subsection and got it to work, but when trying the "How too... Execute a function" I got stuck; more specifically, I'm getting 404 errors. References: - Google Apps Script REST API overview page: https://developers.google.com/apps-script/api/concepts. - JavaScript quickstart instructions: https://developers.google.com/apps-script/api/quickstart/js - The How To... Execute a function: https://developers.google.com/apps-script/api/quickstart/target-script This is my environment: - Google Workspace account. I'm the domain administrator. - New Google Cloud project, created following the quickstart instructions - New Google Apps Script project, created using the quickstart instructions Hardware and Installed Software - Mac Mini Apple M1, MacOS Ventura 13.4.1. - Google Chrome - Visual Studio Code