Using Google Sheet as Database

One way to show the data to your client with read only(depends on you) access accessible through web/mobile without creating new interface. Google Sheet is one of the solutions you can pick. Google sheet provides security features, history etc.. which make stuffs easier.

Using GSHEET as a DB is probably not a good idea. This is just an experiment (You might lose your hair)

On this article I will teach you how to Integrate Google Sheet as your database with PHP engine. LET’S GET STARTED!

We need Google Developer Console Account for this

  1. On your google developer console account create a new project , name it whatever you want 😉 .
  2. Once it is successfully created. Click on credentials , then create credentials. Select service account key  cc
  3. Then you will be redirected to this page(see image below).
  4.  On service account select New service then fill out Service account name(input whatever service name you want). Choose P12 as Key type
  5. Then hit Create!
  6. After it is created .p12 file should be automatically downloaded(example file: whateveryouwant-2.p12 – dont lose this file we will gonna use this for Google Service API)  and pop out look like this(see image below). Note on the private key “notasecret” we will be using this one later. (BTW You can hit close)pop
  7. After closing the modal you will be Service Accounts Please note on the service account ID from the service account we created. It’s an email address format right? This we will use this email address later.
  8. Next step is to create your own GOOGLE SHEET (now here we go setting up our DB).
  9. Done creating your own GOOGLE SHEET?
  10.  Hold up! dont close the sheet. Click on share.
  11.  Now share it to the service account we created on step #7. (Input the service account ID in this case the connection with PHP using google service API will be in  my next article 😉

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s