Syncing Large Quantities Of Data From Google Sheets To Bubble.io Database

Hi @klingkyle04,

Should be possible, there are (at least) 2 options:

A) Saving the data in the Bubble DB, retrieve the data from Google sheets as described in Test 2 in the first post of topic Mastering Google Sheets API. Next use Bubble’s bulk API to get the data into Bubble, check this video: How to Create Data in Bulk in Bubble.io | Bubble.io Tutorial - YouTube.

B) Not saving the data in the Bubble db (since you already have the data in Google Sheets), but just retrieving it from Google Sheets and displaying it in a repeating group (or other element). The issue with this is that the Google Sheets API does not provide the data in format that can easily be used in Bubble, see Google Sheets API - Connection to Bubble, hence the third party solutions you are referring to. But these days we have ChatGPT :grinning:. ChatGPT returns this Javascript to transform the data coming from Google sheets to a JSON format with keys and values:

let headers = data.values[0];
let rows = data.values.slice(1);

let objects = rows.map(row => {
let obj = {};
headers.forEach((header, index) => {
obj[header] = row[index];
});
return obj;
});

What you will have to do is this:

  1. Create a backend workflow API that retrieves the data from Google Sheets and transforms the data as described above using the server script action from the Toolbox plugin
  2. Using Bubble’s API Connector plugin create an API connection to the API you created during step 1.
  3. Use the API connection created during step 2 as a datasource for the repeating group to display the transformed Google Sheets data.

Hope this helps,

Gerbert
MVP Design

2 Likes