GithubHelp home page GithubHelp logo

cuulee / supabase-googlesheet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jadynekena/supabase-googlesheet

0.0 0.0 0.0 118 KB

In this project, you will learn how to pull datas from supabase to google sheets in a matter of minute

JavaScript 100.00%

supabase-googlesheet's Introduction

Supabase-Googlesheet

In this repo, you will see how to pull datas from your supabase project using Supabase API to a Google Sheet. No matter how many fields and rows you want to pull, this should always work. If not, feel free to contact me so that we can look at your issue.

The code

You can get it here.

Prerequisites

This project assumes that you are already familiar to supabase and Google appscript.

You will need :

  • the URL of your supabase project
  • its API KEY (service role or anon one, depending your RLS)

supabase-project-details.png

And of course : your Google account.

How often can I refresh datas ?

  • Every minute
  • Every hour
  • Every day
  • At a specific date
  • On a special event (event-driven triggers)

More informations about Google script triggers here.

CAUTION : be careful of your daily quotas on your Google account. For a free account, you can have 90 minutes of runtime per day (July 2022). Check out the details of Google triggers quotas here.

Motivation

Google Scripts can't handle postsgresql connections yet, so here is a workaround to pull datas everyday at the same hour. We don't really want a realtime update. Just a snapshot is enough.

Once the datas are available on your Google Sheet, you can explore many possibilities, like using Google Data Studio that pulls datas from Google Sheets every 15 minutes.

Errors handling

If you find any issue related to the code, please contact me so that I can help you.

Limits and recommandation

  • Your daily quota from your Google account as stated before
  • Your supabase max rows limit, which can be changed here :

max-rows-supabase-api.png

I highly recommand you to :

  • set this parameter according to the average amount of datas you are going to pull (here for me is ~3.5k rows so I have 500 as an offset)
  • NOT set this parameter too high (as low as possible actually) or/and to create a strong RLS to make sure that :
    • your supabase API is not over loading (I already tried with 10k rows and it's definitely NOT a good idea)
    • your users don't over pull your datas

Have fun with your datas !

supabase-googlesheet's People

Contributors

jadynekena avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.