Skip to content

Automatically sync google sheet content to Firebase realtime database with google apps script

Notifications You must be signed in to change notification settings

guryaniv/sync-googlesheet2firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Sync google sheet to Firebase

Using google apps script, we can sync the content of a google sheet to Firebase realtime database.
My usecase- update food ordering app's menus by only changing the google sheet, without the need to code or access the database.

Prerequisites

You need to have the firebase realtime database setup and the google sheet that you would like to sync data from. The database rules must allow reading and writing (this can be changed later).

Setup

  1. Inside the sheet, go to Tools -> Script editor
  2. Replace the content of Code.gs and appsscript.json files with the ones here.
  3. Insert your spreadsheetID and firebaseUrl inside the getEnvironment() function in the Code.gs file
  4. Adjust the formJSON() function inside Code.gs to create the object that you would like to sync.
  5. Go to Run -> Run function -> initialize

About

Automatically sync google sheet content to Firebase realtime database with google apps script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published