How to create custom Web Apps with Google Apps Script

preview_player
Показать описание
Learn more about Google Apps Script
Complete course for beginners to Professional 26.5hrs of HD video
Google Apps Script Complete Course New IDE 100+ Examples
Google Apps Script New Version Create custom functions within G Suite Docs Sheets GMail Drive Calendar and more
Loaded with coding examples and source code to create 100s of apps script coding projects. Course content web development and web design courses with coding examples and source code for the lesson content. Source Code is available within my Github account. Lessons posted are designed to help students learn more about a specific topic related to modern web development and applying code.
How to create Web Apps with Apps Script

Web Apps with Apps Script

Web apps allow you to publish your script to the web, with a unique URL that others can then access and interact with. Best practice is to use a standalone script for web apps, although you can also create the same webapp within a bound script. For the web app to return results it uses the default functions within Apps Script of either a doGet(e) or doPost(e) function or both can be used on the same endpoint. The results will be returned depending on the method used to connect to the webapp. If you open the URL in a browser the method used is GET.

The e argument represents an event parameter that contains information from the request URL parameters. For the Get method the parameters will be as below in the object response.

{"contextPath":"","parameter":{"id":"3"},"contentLength":-1,"parameters":{"id":["3"]},"queryString":"id=3"}

The value of parameter and parameters are both objects that will contain any value parameter. The parameters can be added to the URL using the ? and a key with a value separated by an equal sign. You can add additional parameters using the & symbol to the request URL.

Create a custom response with data coming from a Spreadsheet. Using the parameter of id, retrieve the corresponding row value for the id value.

Using doGet(e) retrieve the e parameters and run the code in the default function for the webapp

Using a condition check if the property value of id is contained in the e parameters object. If it is then update the output html with the content from the spreadsheet row.

Using the getValues() retrieve the data in a nested array format. The row value can now be used to retrieve an item from the array, as each array nested within it represents a row of data from the spreadsheet. Return the data of the resulting row.

Update the output html with the sheet data

Create the return of the HTMLService and create the HTML output.

Laurence Svekis is a professional top selling course author having instructed over 1 Million students both online and in person. Laurence Svekis is a Google Developer Expert specializing in Google Workspace automation using Google Apps Script Code.

Tags and Keywords

#DiscountPrice #GoogleAppsScript #CustomFunction #SpreadsheetFormula #DollarFormat #USCurrency #ColumnHeaders #OriginalCost #DiscountValue #NewTotal #Formatting #CalculatePrice #CalculateDiscount #CalculateTotal #PriceReduction #PercentageDiscount #ApplyDiscount #SpreadsheetCalculations #AutomateCalculations #IncreaseEfficiency #ProductPricing #SalesDiscount #SalesPrices #OnlineSelling #Ecommerce #SmallBusiness #Entrepreneur #Finance #Accounting #ProductManagement #CostManagement #PricingStrategy #Marketing #BusinessTools #GoogleDrive #CloudComputing #OnlineProductivity #Collaboration #DocumentManagement #OfficeTools #CustomizableFunctions #EfficientCalculations #TimeSaving #Budgeting #CostReduction #SalesAnalysis #DataAnalysis #FinancialPlanning #BusinessOperations #CostBenefitAnalysis #SalesReport #SalesMetrics #Revenue #Profit #ReturnOnInvestment #ROI #SmallBusinessTools #OnlineBusiness #VirtualBusiness #DigitalBusiness #OnlineSales #WebStore #DiscountedPrices #BulkDiscount #Promotion #SaleEvent #LimitedTimeOffer #ClearanceSale #FlashSale #DiscountCodes #CouponCodes #SocialMediaPromotions #MarketingCampaigns #ProductPromotions
Рекомендации по теме
Комментарии
Автор

Following your video and when I recreate it and execute either in debug or using a URL the messge says the script complete but did not return anything. No window opens.. Execution log shows start and end. I am assuming I do not need to have any HTML files open becasue I se no reference to any so assume a new browser window should open.

malcolmsokol
Автор

Thanks sir for this helpful tutorial ... i'm wondering wheter the the deployement of a google app script as WebApp is free or it charges some fees ?
Thanks in advance

mrmido
Автор

How to create submit after redirect form using google webapp script

mayursawant
visit shbcf.ru