Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
Supabase and Google Apps Script

Is it possible to use Supabase with Google Apps Script (GAS)?

I'm new to Supabase and I've never tried to import external library to GAS before. I'm planning to use Supabase as a database for my project in GAS. The project is built to run a bot in a chatting platform rather than a user interface. Based on the documentation from Supabase, it looks like it works by executing function from the Supabase library.

I have tried to use the Supabase library by copy-pasting the whole library from here or using eval(), but all of them return the error: ReferenceError: self is not defined.

Here is the function I run that uses eval():

function myFunction(){
  var x = eval(UrlFetchApp.fetch("https://unpkg.com/@supabase/supabase-js").getContentText())
  var supabase = createClient(supabaseUrl,supabaseKey)
}

createClient() is supposed to be a function from the Supabase library.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

One possible route that I can think of to make this work is to use Postgrest, which is the underlining API server that Supabase users.

Since every Supabase instance can be accessed using Postgrest, you should be able to perform insert, update, delete and read operations to your Supabase database from your GAS project.

You can probably run something like this to access Supabase.

$anonKey = "YOUR_SUPABASE_ANON_KEY_HERE"
$url = "YOUR_SUPABASE_URL_HERE"
$var options = {
     "async": true,
     "crossDomain": true,
     "method" : "GET",
     "headers" : {
       "Authorization" : "Bearer " + $anonKey,
       "apikey": $anonKey
     }
   };
var response = UrlFetchApp.fetch($url + "YOUR_QUERY_PARAMETER_FOR_POSTGREST", options);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!