Search sidebar
A sidebar input calls findRows(query) on the server, which returns matching rows as JSON and renders them in a table in the sidebar.
HtmlService lets Apps Script show custom HTML as a dialog, sidebar, or full web app page inside or beside your spreadsheet. You design the UI with HTML and CSS, then call server functions with google.script.run to read and write sheet data without building a separate website.
Use HtmlService when you need a friendlier interface than a raw grid: multi-step forms, search boxes, approval buttons, or dashboards that pull live data from the active sheet.
Skip HtmlService for tiny tasks a Browser.msgBox or custom menu item can handle. Full web apps with heavy traffic may need tighter security review than a simple sidebar.
Create an HTML file in the Apps Script project, for example Sidebar.html.
In Code.gs, return HtmlService.createHtmlOutputFromFile('Sidebar') or createTemplateFromFile for dynamic placeholders.
Show the UI with SpreadsheetApp.getUi().showSidebar(html) or showModalDialog(html, 'Title').
In the HTML, use google.script.run.withSuccessHandler(fn).serverFunction(args) to call functions in Code.gs.
Deploy as a web app when the page should open from a URL instead of inside Sheets.
Test permissions because server functions run with the same scopes as the rest of your script.
A sidebar input calls findRows(query) on the server, which returns matching rows as JSON and renders them in a table in the sidebar.
A custom menu opens a modal dialog with Approve and Reject buttons that call updateRowStatus(rowId, status) on the active row.
HtmlService serves a public form page that posts new entries to the sheet through a server function, without sharing the whole workbook.
Build this without starting from a blank cell
Use a Better Sheets tool for HtmlService, then watch a walkthrough when you want the full pattern.
Watch how HtmlService works
Guides that explain HtmlService in more depth.
Did you know you can use Google Apps Script to turn a Google Sheet into a free, auto-syncing database for your website? This guide shows you exactly how to set it up. You’ll prepare your spreadsheet, write a few lines of code and publish your site. Don’t worry if you’re not a developer, we’ll walk you through it. Why Use Google Sheets as a Database? For small projects, Google Sheets offers many advantages over traditional databases: * Free hosting and storage * Easy to edit data without...
Read post →Boost productivity and streamline your workflow in Google Sheets with our quick tips and free tools. Breathe new life into your spreadsheets today.
Read post →Replace typing with clicking. Instantly color-code options. Discover a revolutionary way to manage your lists with Google Sheets new dropdown feature!
Read post →A web app turns your script into a URL that runs doGet or doPost when someone visits or posts data. The page can read and write your spreadsheet behind the scenes, which is useful for simple forms, internal tools, and lightweight APIs without standing up a separate server.
Read guide →The Script Editor is the Apps Script workspace inside your spreadsheet where you write JavaScript that talks to Sheets, Gmail, and other Google services. You open it from Extensions > Apps Script. Every function you save can be run manually, bound to a trigger, or linked from a custom menu.
Read guide →Automation means work happens without repeating the same clicks every day: imports update, emails send, rows move, and dashboards refresh. In Sheets, automation usually stacks built-in features, Apps Script, and sometimes the Sheets API or add-ons. Start with the lightest tool that still solves the job.
Read guide →A workflow is the path work takes through your sheet: intake, review, approval, done. Good workflows use consistent columns, statuses everyone understands, and just enough automation to move tasks forward without hiding steps from the team.
Read guide →Done reading about HtmlService?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.