Templates Plugins Courses

Sending all data from Bubble Database to a Google Sheet

I believe I properly installed the Google Sheets Service plug in.

My goal is to have the user click a ZQ sheets button that (1) creates a new Google sheet and (2) sends all of the user’s data in the Bubble spreadsheet to the Google sheet create in (1).

My questions:

  1. Even the first workflow (shown in the screenshot below) does not seem to be working - how do I get it to work?

  2. How do I send all data from the Bubble spreadsheet to a Google sheet? Is it the

Thanks!

Hello @hshadab

Thanks for reaching out!

  1. For reference you could check out the demo setup:
    https://bubble.io/page?type=page&name=google_sheets_charts_service&id=zeroqode-demo-16&tab=tabs-1

See the Group Main from Elements Tree:

The Creation process of a Spreadsheet is working properly on the test stand: https://www.loom.com/share/1a387b4cc25b4965adb5336c17f43d64

  1. I’m not actually sure, but if by sending you meant interaction between Bubble’s Database and the Google Spreadsheet, should be possible using Dynamic Value and searching for Database entries . Before sending data from database you need a workflow to write down into database the values for respective fields.

Hope this helps.
:pray:

Regards,
Dumitru.

Thank you I will try this and let you know.

Hi Dumitru,

I seem to have done all the steps correctly to Create a new spreadsheet, as there are no errors and my app returns back a spreadsheet ID:

However, it doesn’t seem to be creating the new spreadsheet in my account. I can’t see any new spreadsheet in my Google Drive, and when I try to access the spreadsheet via the URL I need to request access.

So my problem now seems to be properly connecting the service in Bubble to my Google Drive account.

Hello @hshadab

Glad that you’ve manged to make it work. :pray:

However the plugin Google Sheets Service Type has different workflow. It is not designed to be used with your Drive, but instead it works with virtual drive through google service.

The regular account is just a normal Google account that your application uses. Since regular accounts require the manual authorization step (going to the browser, logging in to Google and authorizing your app), you need to do this manually the first time and then save the token. There’s some examples in this page. After you save the token, your app can authorize itself without your intervention.

The service account is an account that is not associated with an user and that do not require manual authorization. You can create a service account in the Developers Console as described here. With this type of account, you use a private key file to authorize your app.

If you want to connect the user their personal account when signing in and working with personal sheets, you’ll need to use a different plugin instead:

Please check the demo setup and documentation for it, so it will help you better.

Thanks for understanding.

Regards,
Dumitru.

Thank you for the clarification.

I believe that I have correctly set up the Service Account and authorized my app following ZQ’s instructions. See the screenshots below showing my enabled service account and also the proper information in my Bubble app.

From my Google service account:

From my Bubble app:

My questions:

  1. does there seem to be something wrong with how my service account is set up?

  2. does there seem to be something wrong with how my app is authorized to use the service account?

  3. If the service account is properly set up and my app is authorized, how do I obtain access to new spreadsheet my app’s workflow is creating? Is it automatic or do I need to create another workflow that authorizes access to the spreadsheet?

Thank you!

Update: I was able to view the new spreadsheet that is created by using the Allow Spreadsheet access (everyone) workflow action. My service account and my app authentication are properly set up.

My new question is about getting and/or displaying that new URL from your following demo workflow:

And:

My questions are:

  1. what kind of state is get_spreadsheet_data ? Is it text or something else?

  2. For the Value of the get_spreadsheet_data state in the worlflow, how do I set it to Google Sheets - Get Spreadsheet (Data)?

Update: I don’t think I need my questions answered right now as I added a workflow to make it work so that the user can click a second button to view the spreadsheet that is created.

My next goal is to actually send the data from my Bubble spreadsheet to the new spreadsheet that is created.

I will post here if I’m having trouble.

1 Like