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

Overview

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 !

You might also like...

A module for modifying sheet rolling functions on Foundry VTT Character sheets for D&D 5th Edition.

A module for modifying sheet rolling functions on Foundry VTT Character sheets for D&D 5th Edition.

Ready Set Roll for 5e - FoundryVTT Module Ready Set Roll is a Foundry VTT module that accelerates the built in rolling system of the Foundry DnD5e sys

Dec 12, 2022

Example project implementing authentication, authorization, and routing with Next.js and Supabase

Example project implementing authentication, authorization, and routing with Next.js and Supabase

Magic Link Authentication and Route Controls with Supabase and Next.js To run this project, To get started with this project, first create a new proje

Dec 11, 2022

This is a project to make the supabase REST API available from PrismaClient.

This is a project to make the supabase REST API available from PrismaClient.

sb-prisma 🔧 This project is experimental and not yet stable, so please use with caution. We look forward to your contributions. ⚠️ For non-node runti

Jul 6, 2022

This project is based on the Awesome Books app repo, refactored with ES6 and organized with modules. The purpose of this project is to learn functionality organization using JavaScript modules.

Awesome Books with ES6 and modules A basic app project built with HTML, CSS and JS ES6 to keep track of awesome books. Built With HTML/CSS and JS best

Aug 27, 2022

A simple self-use pull template project

A simple self-use pull template project

English | 简体中文 temp_manage A simple self-use pull template project. Supports github, gitlab, Bitbucket If you have an excellent template project, you

Jul 21, 2022

Tool for GitHub/GitLab to keep Repositories/Projects you are interested in and their Pull/Merge Requests in desktop Tray Menu

Tool for GitHub/GitLab to keep Repositories/Projects you are interested in and their Pull/Merge Requests in desktop Tray Menu. More info in User Guide.

Jul 31, 2022

Make your first Pull Request on Hacktoberfest 2022. Don't forget to spread love and if you like give us a star

Make your first Pull Request on Hacktoberfest 2022. Don't forget to spread love and if you like give us a star

Hacktoberfest2022 Make your first Pull Request on Hacktoberfest 2022. Don't forget to spread love and if you like give us a star Quality of Pull Reque

Oct 30, 2022

This is a simple script to upload Multiple files into google drive using google drive API and Nodejs.

Welcome to gDrive Multiple File Upload 👋 This is a simple script to upload Multiple files into google drive using google drive API and Nodejs Install

Dec 29, 2021

Google-reviews-crawler - A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file.

google-reviews-crawler A simple Playwright crawler that stores Google Maps Place/Business reviews to a JSON file. Usage Clone the repo, install the de

Oct 26, 2022
Owner
Jady Nekena
Jady Nekena
Learn how to set up Supabase auth for both the frontend and backend of your application using a JWT - JSON web token.

Supabase auth, frontend + backend - example with Next.js Learn how to set up Supabase auth for both the frontend and backend of your application using

YK 7 Nov 20, 2022
Flight is a universal package manager for your needs, no matter what language you may want to write your code in.

Flight Swift, reliable, multi-language package manager. ⚡ Installation We don't have an official release of Flight yet, however, if you would like to

null 26 Dec 25, 2022
Google-Drive-Directory-Index | Combining the power of Cloudflare Workers and Google Drive API will allow you to index your Google Drive files on the browser.

?? Google-Drive-Directory-Index Combining the power of Cloudflare Workers and Google Drive will allow you to index your Google Drive files on the brow

Aicirou 127 Jan 2, 2023
Learn Basic of Node Express Server and Git & Github by creating Pull Request in this repository.

hacktoberfest-express-server-2022 Learn Basic of Node Express Server and Git & Github by creating Pull Request in this repository. Special Note For Ev

NetScape-Web 3 Oct 6, 2022
Generate smooth, consistent and always-sexy box-shadows, no matter the size, ideal for design token generation.

smooth-shadow Generate smooth, consistent and always-sexy box-shadows, no matter the size, ideal for design token generation. Demo As Tobias already p

Thomas Strobl 4 Oct 15, 2022
🌸 A fast and fun way to learn Japanese alphabets: hiragana & katakana. Don't wait - learn now!

Sakurator | Start learning 日本語 here Sakurator (Website publish date: ~4-6 April '22) - a personal trainer for learning Japanese alphabets (hiragana &

Anatoly Frolov 3 Jun 22, 2022
This Next.js app is designed to be used with the Figment Learn Pathways, to help developers learn about various blockchain protocols such as Solana, NEAR, Secret, Polygon and Polkadot!

???? What is learn-web3-dapp? We made this decentralized application (dApp) to help developers learn about Web 3 protocols. It's a Next.js app that us

t0nto 8 Oct 1, 2022
A place for all of my cheat sheets.

Who doesn't love cheat sheets? This repository will behold all of my cheat sheets in the future! At the moment, you will find: Languages Prolog Data S

Amine Haj Ali 24 Jun 9, 2022
Lightweight basic CSS style sheets.

Styled CSS Base Lightweight basic CSS style sheets. If you get tired of setting up a comprehensive styling scaffold, you may try returning back to thi

Zheeeng 19 Oct 21, 2022
switch Alternate Style Sheets

alternate-stylesheets.js switch Alternate Style Sheets Installation npm $ npm install alternate-stylesheets yarn $ yarn add alternate-stylesheets Usag

sasaplus1 1 Dec 11, 2021