By the end of this lesson the approver will open one link on their phone, see the pending leave requests, and tap Approve or Reject, while the same decide function from lesson 3 does every check.
You need: the app from lesson 3 with decide(row, status, note) working from the menu, your SPEC.md, and a phone signed in to the approver's Google account · Time: 9 minutes
The menu and the button only work in a computer browser. Managers approve leave from their phones, between meetings. An Apps Script web app is a small web page that your script serves: a function called
doGetbuilds the page, and buttons on the page call your script withgoogle.script.run.The page only shows and asks. The script decides, after its checks. Why?The page is only a remote control. All the rules stay in
decide, so a page bug can at worst show something wrongly; it cannot approve something the rules forbid.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Decide who runs it and who can open it
- Ask the AI for the page, in two pieces
- Test it, then deploy it
- Try to break it before anyone else does
- Recap