Manage a website from Google Sheets

Faerul Salamun
3 min readFeb 17, 2021

Hello everyone. In this article, I want to share how to manage a website from Google Sheets.

Requirements :

1. Google Account
2. Node.js
3. NPM and Yarn
4. MongoDB
5. Ngrok (Optional)

First, create a file in your Google Sheets. Insert in column A row 1 Title, column B row 1 Description, and column C row 1 Image.

Next, we will set up the backend Node.js, MongoDB, and Ngrok. You can download the source code here. You can change the connection to MongoDB in file src > app.module.ts.

After changing the connection, you can run the application with the command npm install and then npm run start:dev . If you don’t have a public IP/Domain, you can use Ngrok or another service like Ngrok, download Ngrok here. Run command ./ngrok http 3000 . https://e8288a140e99.ngrok.io is your domain.

The backend is ready, next we will set up the website. You can download the source code here. Open file pages > index.jsx and open line 48 and change to your public IP/Domain.

Run the application with the command yarn install and yarn dev. Back to Google Sheets, open tools > script editor

Open Project Settings and click the Show “appsscript.json” manifest file in editor.

Back to Editor, In appscript.json change to this code

And in Code.gs change to this code

Don’t forget to change https://e8288a140e99.ngrok.io to your public IP/Domain. Next, go to Triggers Menu and Add Trigger

Add two triggers like the image below and then save. You will be asked permission for these triggers, let allow this permission.

Next, time to test :). First add data in columns A, B, and C row 2.

Open your browser and go to URL http://localhost:3001, the result like image in the below :

Notes :
- The code is not ready for production, just for development :)

--

--