This Google Sheets script fetches data from a Supabase database and writes the selected headers and data to the active sheet. The script first clears the sheet, writes the headers, then fetches the data from the Supabase API, and finally writes the data to the sheet. It is optimized and has anonymized variables for public use.
- Create a new Google Sheet or open an existing one.
- Click on "Extensions" in the menu, then select "Apps Script." (If you don't see "Extensions," click on "Tools" and then "Script editor.")
- In the Apps Script editor, replace the default
Code.gs
content with the content ofsupabase_to_google_sheets.gs
. - Replace the
SUPABASE_URL
andSUPABASE_ANON_KEY
variables with your actual Supabase URL and anon key.