πππππππππππππ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 Microsoft Azure account and create a Microsoft Azure 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://portal.azure.com/β Log in to your Microsoft account.
β Click on View button of "Manage Azure Active Directory" section.
β Click on App registrations on left-side of the dashboard.
β Click on "New registration".
β Fill all the details and register an app.
β Register redirect URL in the app.
β Create a client-secret and save it.
βΈ Step (1 to 8) is explained in detail:
βΈ Watch Youtube video here:
https://www.youtube.com/watch?v=ACXrdPANgE0ππππππππππInstalling the Pluginππππππππππ
β Log in to your Bubble account
β Go to Plugins
β Search for βOnedrive 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> or just <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=Ewggz0dVdzgππ
β Drag and drop the element "OneDrive".
β Add an action called "Onedrive - Get Auth Code" which requires you to add Client-ID and redirect URL. This will return a URL that needs to be opened.
Note: The redirect URL should match exactly as you have set while configuring in Microsoft Azure project.
β 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 Onedrive 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 from Auth Code". This will require you to pass the client-ID, client-secret, code (you will get it from the element 'OneDrive' and the param is named as 'OneDrive-Auth-Code') and redirect URL (this should match the one added in the Microsoft Azure 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 from Refresh Token" action to get the Access token from Refresh Token. This requires you to provide client-ID, client-secret and refresh token.
ππ Actions ππ
β½ Get all files/folders from your drive
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β Outputs:
β» List of files/folders in the root drive.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=VNU7blpQBHEβ½ Get recent files
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β Outputs:
β» List of files/folders in the recent section.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=VNU7blpQBHEβ½ Get shared files
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β Outputs:
β» List of files/folders in the shared section.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=VNU7blpQBHEβ½ Create a folder in the root-drive
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» drive-ID: It is the ID of the drive where folder will be created.
β» Name: It is the name of the folder which will be created.
β Outputs:
β» Details of the folder created.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=OiwSWiju3gcβ½ Create a folder in another folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» drive-ID: It is the ID of the drive where folder will be created.
β» folder-ID: It is the ID of the parent folder where child folder will be created.
β» Name: It is the name of the folder which will be created.
β Outputs:
β» Details of the folder created.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=OiwSWiju3gcβ½ Update a file/folder in the root-drive/folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive-ID: ID of a drive.
β» Item-ID: ID of an item in the drive.
β» Name: Name of the item that needs to be updated.
β Outputs:
β» Details of the file/folder updated.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=2g9IsK9PY7Eβ½ Upload files below 5MB in the root-drive/folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of an item in the drive.
β» File URL: URL of the file that needs to be uploaded. Size of the file needs to be below 5MB.
β Outputs:
β» Details of the file uploaded in the drive.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=2XC_Zg6BoLoβ½ Upload large files
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of an item in the drive.
β» File URL: URL of the file that needs to be uploaded.
β Outputs:
β» Details of the file uploaded in the drive.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=2XC_Zg6BoLoβ½ Get all files/folders from another folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Folder-ID: ID of the folder in the drive.
β Outputs:
β» List of items in the folder.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=OiwSWiju3gcβ½ Delete a file/folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Item ID: ID of an item in the drive.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=2g9IsK9PY7Eβ½ Copy a file/folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β» Drive-ID: ID of the drive where item needs to be copied.
β» Item-ID: ID of the folder where item needs to be copied. Optional
β Outputs:
β» Details of the item copied in the new location.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=73DQjJcgO_cβ½ Move a file/folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive where the item is present.
β» Item-ID: ID of the item in the drive.
β» Drive-ID: ID of the drive where item needs to be moved.
β» Item-ID: ID of the folder where item needs to be moved. Optional
β Outputs:
β» Details of the item moved in the new location
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=73DQjJcgO_cβ½ Create a sharing link of a file/folder
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β» Type: Its the type of sharing link to create. Either view, edit, or embed.
β» Scope: If true, any current inherited permissions are retained on the shared item when sharing this item for the first time. If false, all current permissions are removed when sharing for the first time. The default value is true. Optional.
β» Retain Inherited Permissions: ID of a drive.
β» Expiration Date-Time: It is the expiration time of the permission with format of yyyy-MM-ddTHH:mm:ssZ. Ex - 2023-03-20T12:05:00Z
β» Password: The password of the sharing link that is set by the creator. Optional and for OneDrive Personal only.
β Outputs:
β» Details of the item with the sharing link.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=hWnJzp3Jg20β½ Download file
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Item-ID: ID of the item in the drive.
β Outputs:
β» URL of the item where it will be downloaded
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=2XC_Zg6BoLoβ½ Follow an item
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β Outputs:
β» Date of the followed item with the drive ID.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=TH7FVaSGQ8Yβ½ Get followed items
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β Outputs:
β» List of files/folders that were followed.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=VNU7blpQBHEβ½ Unfollow an item
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=TH7FVaSGQ8Yβ½ List all permissions
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β Outputs:
β» List of permissions of the item.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=y13ioemQiH8β½ Create permissions for an item
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β» Recipients: List of email address on which the permissions will be used while accessing the item.
β» Message: Any message to convey to the user accessing the item.
β» Requires Sign-in: If you want the user to sign in then true or else false.
β» Send Invitation: If you want to send an invitation then true or else false.
β» Roles: List of roles for the item. Ex - "write".
β» Expiration Date: Date of expiration of the permisssion. Ex - 2023-03-20T14:00:00.000Z.
β Outputs:
β» Details of the item with the permission created.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=y13ioemQiH8β½ Update permission for an item
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β» Permission-ID: ID of the permission of an item in the drive.
β» Roles: List of roles for the item. Ex - "write", "read", "owner".
β Outputs:
β» Details of the updated permission of the item.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=y13ioemQiH8β½ Delete a permission for an item
β Inputs:
β» Access token: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Drive ID: ID of the drive.
β» Item-ID: ID of the item in the drive.
β» Permission-ID: ID of the permission of an item in the drive.
β Outputs: None
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=y13ioemQiH8