πππππππππππππSet-Upππππππππππππππ
We have detailed video tutorials for each of the actions/elements we have in this plugin. Watch them to understand and use it at ease.
ππ You must set up your Google Cloud account and create a Google Cloud Project before you can use this plugin. Takes less than 5 mins if you follow the instructions. It is a one time process which is necessary to get your client-id and client-secret. ππ
β Go to
https://console.cloud.google.com/β Log in to your Google account.
β Create a new project.
β Enable Google Drive API.
β Create credentials for the API along with redirect URI.
β Note down the Client-ID and Client-secret.
βΈ Step (1 to 6) is explained in detail:
βΈ Watch Youtube video here:
https://www.youtube.com/watch?v=k1Y-jR1bpOIππππππππππInstalling the Pluginππππππππππ
β Log in to your Bubble account
β Go to Plugins
β Search for βGoogle Drive by Ritz7β
β Install the plugin
πππππππππππUsing the Pluginπππππππππππ
ππ Note: In all the actions, we have a field named "Authorization". This field should be in the following format: Bearer <Access-Token>. Access Token will be valid for 60 mins from the time it is generated and you can regenerate it using the Refresh Token. And this step is explained in detail here:
https://www.youtube.com/watch?v=AsyYBqPsJpAππ
β Drag and drop the element "G-Drive".
β Add an action called "Get G-Drive Auth-Code via URL" which requires you can add Client-ID and redirect URI. This will return an URL that needs to be opened.
Note: The redirect URI should match exactly as you have set while configuring in Google Cloud.
β Add Next step: You will have to open the URL you get from the previous step.
Note: This will ask your permission for your app to use your Google Account. Once you permit, the element will automatically fetch the code from the URL.
β Generate Auth Token via code: Call an Action "Get_Access_Token-via_Code". This will require you to pass the client-ID, client-secret, code (you will get it from the element 'G-Drive' and the param is named as 'G-Drive-Code') and redirect URI (this should match the one added in the Google Cloud Project)
Note: You will also get Refresh Token along with Access token from step-4. You use Refresh Token to get the Access Token once the old Access Token expires.
β Use "Get_Access_Token-via_R-Token" action to get the Access token from Refresh Token. This requires you to provide client-ID, client-secret and refresh token.
ππ Actions ππ
β½ Get Files/Folders List
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β Outputs:
β» List of files/folders with their details.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=pP9GSbu46MQβ½ Get Files/Folders inside a Folder
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Folder_ID: ID of the folder where the items will be fetched.
β Outputs:
β» List of files/folders with their details.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=pP9GSbu46MQβ½ Upload file
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File-name: Name of the file to be uploaded.
β» File-type: Mimetype of the file to be uploaded.
β» Base64: Base64 of the file to be uploaded.
β Outputs:
β» Details of the file uploaded.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=hz3G1329gc8β½ Upload file within folder
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Folder ID: ID of the folder where file will be uploaded.
β» File-name: Name of the file to be uploaded.
β» File-type: Mimetype of the file to be uploaded.
β» Base64: Base64 of the file to be uploaded.
β Outputs:
β» Details of the file uploaded.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=hz3G1329gc8β½ Create copy of file
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File_ID: ID of the file to be copied.
β» File_Name: Name of the copied file.
β Outputs:
β» List of files/folders with their details.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=loWF3j4epLIβ½ Create copy of file within a folder
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File_ID: ID of the file to be copied.
β» File_Name: Name of the file.
β» Folder_ID: ID of the folder where file will be copied.
β Outputs:
β» Details of the copied file within the folder
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=loWF3j4epLIβ½ Export file
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File_ID: ID of the file to be downloaded.
β Outputs:
β» File will be downloaded.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=9wVvWv322zgβ½ Create Folder within drive
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Folder_name: Name of the folder.
β Outputs:
β» Details of the folder created.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=rpbpOwnGCGUβ½ Create Folder within folder
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» Folder ID: ID of the parent folder where child folder will be created.
β» Folder_name: Name of the folder.
β Outputs:
β» List of files/folders with their details.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=rpbpOwnGCGUβ½ Download File
β Inputs:
β» File URL: File URL received from response of Export File API
β» File Name: Name of the file to be downloaded.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=9wVvWv322zgβ½ Delete File/Folder
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File/Folder ID: ID of the file/folder to be deleted.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=pP9GSbu46MQβ½ List File/Folder Permission
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File/Folder ID: ID of the file/folder where permissions will be fetched.
β Outputs:
β» List of permissions set on the file/folder.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=UNw747FswLEβ½ Create File/Folder Permission
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File/Folder ID: ID of the file/folder where permission will be created.
β» Permission-type: Give the type of permission. It could be "owner, organizer, fileeOrganizer, writer, commenter, reader".
β» Email_ID: Email ID of the user who you wish to give the permission. Ex:
[email protected].
β Outputs:
β» Details of the permission created for file/folder.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=UNw747FswLEβ½ Update File/Folder Permission
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File/Folder ID: ID of the file/folder where permission will be created.
β» Permission ID: ID of the permission created on the file/folder.
β» Permission-type: Give the type of permission. It could be "owner, organizer, fileeOrganizer, writer, commenter, reader".
β Outputs:
β» Details of the permission updated for file/folder.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=ChQ9atAlNOAβ½ Delete File/Folder Permission
β Inputs:
β» Access token: Token is generated from an action "Get Access Token via Code".
β» File/Folder ID: ID of the file/folder where permission will be deleted.
β» Permission ID: ID of the permission on the file/folder.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=ChQ9atAlNOA