Services Plugins FAQs

Google Drive Plugin: Upload Error Need Help

I have bought the Zeroqode Google Drive Plugin. All I need to use it for is simply to allow users to Upload Files to their own Google Drive cloud storage.

I am using the “Google Drive - Upload a File” action. However, I always get this error:

image

See https://cdn1.imggmi.com/uploads/2019/6/4/13e5e46da672520c4ece51416450e3be-full.png

I have added the App ID and App Secret as advised in the documentation of this plugin:

What must I do to allow this Upload action to work? Does the user first need to login to Google Drive? I have done this in the workflows:

However, I keep getting a verification error from Google:

I have completed the OAuth Consent Screen in the Google Console and submitted for verification. I am currently waiting on verification from Google.

Can you please advise on how I can fix that Authentication error and have I set up my workflow correctly in order to upload a file?

Hello @leonidas.petrou4

Please check our demo: https://zeroqode-demo-14.bubbleapps.io/google_drive
And the setup of it: https://bubble.is/page?type=page&name=google_drive&id=zeroqode-demo-14&tab=tabs-1
As refer. Try replicate the actions from it.

Also you if see the Error, the message says what type of error you got. “Invalid Credentials” in image you shared
https://developers.google.com/drive/api/v3/handle-errors#401_invalid_credentials
meaning you should check your API Key credentials and authenticate the app in your google cloud console https://console.cloud.google.com/.

Regards,
Dumitru

Thank you for your reply. So I think I have to wait for verification of OAuth2 from Google.

I do have another question. My users login to the app using the normal email sign up with their email address and password. Will they still be able to login to Google Drive to use the plugin and then still remain signed into the account they originally signed in with?

Once they signed in with a Google Account they’ll remain logged within the app, if want you could log them out.
And yes, they’ll be able to use the Drive once they’ve logged into their accounts.
Hope this helps.

Thanks Dimitru. Does a user need to log in with Google Drive in order to use the plugin? Or can the plugin activities be used without logging in a user with Google Drive?

Hi Leonidas, yes the user needs to log in with their Google Drive account in order for you to access their Google Drive data

1 Like

Thank you. I have got it working and it works great. I would like to know is there a way to name the file being uploaded? Because the ‘upload a file’ activity only has an input for the file link but not the file name. I’ve seen that you can create a new folder and name the folder with the ‘create a folder’ activity, but how would I name the file itself?

I ask because any file I upload gets saved as “untitled”.

it seems like a known bug from google drive, we tried to solve this before but to no avail

Thanks for letting me know. That’s disappointing. Is there perhaps a way that I can save the uploaded file and define a path so it saves in a specific folder? That way, I can create a new folder with a name for each file I upload.

At least that would create some kind of naming convention. I look forward to your reply.

We’ll check it out but it won’t be quick unfortunately

1 Like

Hello @leonidas.petrou4.

Thanks for patience, we checked the plugin and steps should be as follow.

  1. Upload File -> (Get File Id result from step 1) -> Rename File.
    It could’ve been done with one, however it is not possible in Bubble so you’ll need to create this flow.
    Please try it out.

Regards,
Dumitru.

Hi Dumitru,

Thanks for the update of the plugin. I tried this but unfortunately it did not work:

It still saves without the title:

I have used the “Google Drive - Add File to Folder” action after the upload action and it works. However, the “Google Drive - Rename File” action does not work as mentioned above.

Any update on this @Dumitru?

Hi, @leonidas.petrou4

Seems like a there is a problem indeed which our devs are looking into. It may take some time.
We’ll be back to you asap. Thanks for understanding.

Thanks @Dumitru, I appreciate this and look forward to your reply.

@leonidas.petrou4 Hi.

We updated the plugin, please upgrade to latest version, refresh the app and give another try. Thanks for patience.

Hi Dumitru,

Thanks for the update. I have tested it and the renaming functionality works with the latest Version 3.2.0.

However, there is a problem, with this latest version Google doesn’t recognise my app as being verified anymore. My app was previously verified by Google but now when I use Version 3.2.0 I get the following error:

However, when I revert back to Version 3.1.0, this error doesn’t show and works as expected.

I am not sure what I should do?

Hello Leonidas.

We added a few scopes in the api calls :
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/drive.metadata

So the new ones should be granted access to and configured in your OAuth Consent Screen.
https://support.google.com/cloud/answer/7454865#

Regards,
Dumitru.

Thank you very much Dumitru.

I have requested verification with the new scopes. I will let you know if I run into any problems.

Edit: It is now working as expected. Thanks again for the updated plugin.

1 Like

Hi,

I installed the Google Drive Plugin and configured it as requested in the documentation.
However, I can’t have it working: I continuously get an “Invalid Credentials” message when trying to, for example, create a folder.
I tried several times, even with other API Oauth Keys that I created following (again) the procedure. But it’s not working.
How could I check what’s going wrong?