[NO PLUGIN] Bubble x Google Sheets Direct Connection

Bubble x Google Sheets Solution

Hey everyone,

On a project recently I needed to get data from Bubble’s DB into Google sheets and all of the solutions I could find seemed way more difficult than I thought they needed to be, so I’ve put together a super simple solution that’s essentially a Google sheet with some embedded code that connects directly into Bubble’s data API.

So there’s no plugins, you can avoid the API connector, third-party tools & subscriptions and all that. Takes less than 5 minutes to get up and running and you can use it an unlimited amount of time across your own projects. Essentially it’s just a data dump from your Bubble tables into Google sheets, with a big blue button to click every time you want to refresh the data.

Here’s a quick intro video where I demo the solution if you’re interested: https://share.descript.com/view/rJIW0mo0Szb

If you do want to access the Google sheet & video tutorial I do ask that you make a small contribution to my beer fund :beers: here: https://supportdept.gumroad.com/l/bubblexsheets

Please and thank you!

Cheers,
Josh

4 Likes

Hi Josh,

Great idea! Just what I have been looking for!

Unfortunately it appears to only import the first 100 of the data table, which is the max limit of items of the first page that bubble allows, pagination is required to get items past the first 100.

When would an update be made? As only being able to retrive the first 100 entries of the database is a huge issue to being able to use this powerfull process and would stop most people from using this tool.

Cheers,
Huw

Hey Huw,

I’ve just sent you a DM. I’ve had a little trouble handling the pagination, and I don’t have the bandwidth to solve this at the moment. So I’ve suspended sales of the project and I’ve sent you a refund through Gumroad.

Apologies I wasn’t able to get this to work for you. I may pick it up again in the future, but I’m unable to commit to a timeline at the moment

Josh

Great News! This has been completely rebuilt and available for sale again

Some improvements made:

  1. The script now correctly handles pagination and will loop until all records from a query/table are downloaded

  2. The script now works with App Script triggers so can be refreshed on a schedule or based on whatever trigger you choose/is supported by App Script. I need to update the documentation on this as it doesn’t get copied across when you replicate the google sheet - but you can copy what I did in the master google sheet

  3. It’s now more dynamic and efficient.

Hi @josh24,
I just purchased this connector. But, I am not allowed to edit the sheet so sent a request for edit. Thanks.

Hey @yj.johnrhee,

Many thanks for your purchase. I hope this will save you as much time as it has for me :rocket:

To gain access, you’ll need to create your own copy of the sheet first. This particular version is my master copy.

Screen Shot 2022-02-15 at 7.32.43 am

Cheers,
Josh

1 Like

@josh24 Do we have the ability to filter certain data from a table into Google Sheets? For example, only data from a certain ID value.

Also, do we have the ability to connect multiple sheets?

Hey @Stackapp,

You sure can. It’s configured to hit the Bubble general data endpoint and pull down a full table, but it’s very easy to add filters in and is a good idea if you’ve got a lot of data.

I’ve made it easy for people to get started with limited Bubble & Google Sheets knowledge. So there are some fields where you just copy paste a few things from Bubble and I stitch them together in the right format for the API call. The idea is that you’re up and running at a basic level in like 5 minutes

Screen Shot 2022-02-15 at 10.02.05 am

If you wanted to add filters, it depends which ones to how complicated it would be. Essentially the field where I stitch everything together just needs to match back to Bubble’s documentation on the Data API

But in the instance of filtering to a particular ID value it’s super easy. You just add that ID to the end of the Data API Root URL field and it’ll still stitch together correctly.

For example to pull down a full table you’d paste this into where I ask for the Data API Root URL:

https://appname.bubbleapps.io/api/1.1/obj/typename

And to filter by ID you’d just add /unique_ID to the end of that and it would become…

https://appname.bubbleapps.io/api/1.1/obj/typename/unique_id

If you want to add search constraints it does get a little more complicated (see Bubble docs for more details) but again, totally possible and only involves changing a few things in the Google Sheet itself - you don’t need to touch any of the code that sits in the background. I wish I could have addressed this and made it easy for people, but it’s very difficult for me to build something generic that’ll work across any table and not be super confusing at the same time

In terms of the ability to replicate this across multiple tables/projects…

Once you’ve bought the template you have free rein to duplicate it and modify it as much as you like. So you can use it across an unlimited number of tables, bubble projects, in different google sheets etc. There’s no middleware so no limits basically.

The sheet is created around pulling in a single table. But there is no reason why you couldn’t duplicate what’s there and have 10 sheets in the same workbook pulling down 10 different tables, or 10 different filtered versions of the same table or whatever.

Hope this helps

Cheers,
Josh

1 Like

@josh24 Thank you. It works fine.

1 Like

Here’s a short video where I run through the steps to get your Bubble database automatically pushing into Google Sheets. Useful for anyone that’s purchased the script or is considering it.

Hi Josh. This looks great, and want to give it a go but I cant get to gum road to buy as link not working.

https://supportdept.gumroad.com/l/bubblexsheets

Regards

Tim Garrett

Hey, sorry I updated my Gumroad account and thought I’d also updated the link here

1 Like

Review:

This was absolutely great.
The integration is up and running in literally 3 steps and your data is in google sheets. Definitely worth the small cost.

So many alternatives are horrible.

10/10

1 Like

Many thanks, @jobs :grinning:

Glad to hear you love it as much as I do. It’s a staple on every project I touch.

Hi Josh
Thanks for building this.
I’ve successfully set it up, and it works well, except for the fact that sometimes reloading or clicking on the refresh button simply doesn’t update the data. Is there a certain number of times the script can be run per hour, or any similar bottlenecks?

Hey @alan7,

Without looking at the execution log it would be hard to know exactly what is failing. Although, there are limits on both the Bubble & Google side which could cause this to fail.

You can view the execution log in Google Sheet by going to:

Extensions > App Script

Then in the Editor section clicking on ‘Execution log’ which is the last button across the top of the page.

Here are the quotas though from a Google App Script perspective

How often are you trying to refresh this in an hour/day? Are you getting it to refresh over and over or is it fairly irregular and still failing?


Josh @ Support Dept
Helping no-code founders get unstuck fast :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

I post daily about no-code and Bubble on Twitter Follow Support Dept on Twitter

Hi Josh
Thank you for replying. Sorry for not reacting; somehow I seem to have missed the reply notification!

I don’t refresh the spreadsheet constantly, just when I see that there has been a change (I receive an email when a new order comes in).
If I don’t refresh twice within a few minutes, it seems to work fine so far. So I’ve just been more patient. :slight_smile:

However, there is another thing that I am having trouble with: there seems to be a cap of 256 characters for values? I.e. long text field values in my app’s database get cut off after 256 characters in the spreadsheet. Is there any way to make it unlimited? :sweat_smile:

Here’s an updated URL if you’d like to purchase the script.

Hello @josh24

Amazing solution from what it looks. :slight_smile:

Quick question, I am setting the application with an authorization to google service account on behalf of organization. And ofc want to push data from Bubble’s database to Google Sheets.

Will this solution which you’ve created work with a Google Service Account authorization?

Thanks.

Hey @contantestar,

I’m not sure that is relevant in this case. You will generate an API key in the Bubble backend for access to the Data API and then you’ll use that key in the Google Sheet API to gain access to the Bubble database. I can’t quite see how a Google Service Account fits in with all of this, sorry

Cheers,
Josh

1 Like