I presume you mean this effort ?
https://groups.google.com/d/msg/mitappinventortest/liWppNXqHXM/5Ht506yRBwAJ
You seem to have mixed up two different scripts into one, which may be causing some of the problem. replace your existing script with this:
google_script_revised.txt (1.7 KB)
and remember:
1 Open the script project
2 Go to Publish
3 Deploy as Web App
4 Project version: - select New from the dropdown
5 Execute the app as: your google account address (email)
6 Who has access to the app: Anyone, even anonymous
7 Press the Update button
You have to do this EVERY TIME you change your script
Let us know how you get on...