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.