So I’m sure this is the millionth time you think you’ve seen this question, but I’ve searched high and low for solutions to my problem, and everything I’ve found is way too convoluted/cluttered/advanced or beyond the scope of my extremely simple use case. I’ve dabbled with python and HTML (and am fairly comfortable there), and barely touched JavaScript, but I literally started trying to use Google Apps Script a couple of months ago, so bear with me please. I’m asking because I genuinely need help.
For context:
I have a personal group of friends who I play games with, and we’re growing our community. As we do, I’d like to give them more goals and ways to track their overall status/info in the Guild. I already have a spreadsheet (hidden and copy-restricted) with some fields like “Email,” “In-Game Username,” “Discord ID” etc. I want to allow them to see their linked info (from the spreadsheet) directly on my personal website for the group. But I don’t want random people on the web to easily access it. It’s not SUPER personal info so it doesn’t need to be extra hack-proof or anything, I don’t have any of their real names or other info on there. But I want it to be a bit more “private.” I’ve already told them that to use the site they’ll need to give me a gmail address or a Google account e-mail that they can log into to view the web app.
My spreadsheet looks something like this:
In-Game Name | Discord ID | Rank | |
---|---|---|---|
[email protected] | Person One | One#1234 | 5 |
[email protected] | Person Two | Two#1234 | 3 |
Here’s what I want to do, in essence (my pseudo-code):
- Get the active user’s e-mail address
- Search a given sheet (on a Google Sheets spreadsheet) for the active user’s e-mail address
- Create an array/list of data from the row that this e-mail address is on
- Display select information/data from this array/list on the web app (basically I want to be able to isolate some of the data into separate variables with a function, and then display those variables on the web app when the user accesses it… I think)
To give a plain text example of my desired website output:
Hello, USER!
Your linked Discord is USER_DISCORD. Your rank in the guild is USER_RANK.
What I’ve already tried:
I’ve tried about 6 different methods/tutorials that I found online in the past month, but none of them do the very simple, straightforward things that I’m looking for. Plenty of them are trying to pull full tables of data, or whole rows of data, into a web-app and display it in table format. I don’t need any of that. I just want to know how to get the data I want and display it, and I’ll style it/format it from there. I know enough about HTML and CSS to do that much.
The closest I’ve gotten is by using this website: https://www.bpwebs.com/create-web-forms-to-get-data-from-google-sheets/#code-file
I was able to replicate their code and modify it to be able to let users manually search for an e-mail in my sheet, and pull up a whole row of data in a table. But I don’t need or want a form for a user to mess with. I just need to display data. And I don’t need the data displayed in a fancy table, because I want to separate the data out by placement in the list/array before displaying it to the user, in-line with other text I’ll have on the web app.
I’d greatly appreciate any help that anyone can give me on this… it might seem simple but I’m really new to apps script and to Javascript, so I’ve felt a bit like I’m floundering trying to figure it all out from tutorials, and I feel like there has to be a cleaner/more direct way of doing the things I want.