Microsoft OneDrive
The Microsoft OneDrive piece in ZBrain Flow provides seamless integration with OneDrive cloud storage, allowing you to interact with files and folders directly from your workflows. This powerful connector enables you to upload, download, and manage files without manual intervention. With OneDrive integration, you can build automations that store documents, retrieve content, organize files, backup important data, and synchronize information between OneDrive and other systems. This piece is ideal for businesses that use OneDrive for document storage and want to incorporate file management capabilities into their automated processes.
How to Use Microsoft OneDrive in ZBrain Flow
Step 1: Select Microsoft OneDrive as Your Connection
Click on the '+' button in the Flow and search for Microsoft OneDrive.
Select Microsoft OneDrive.
Decide on the action you need, then select it. ZBrain Flow provides several options:
Upload file – Upload files in your OneDrive account, with support for large files.
Download file – Download files from your OneDrive account.
List Files – View all files in a specified OneDrive folder.
List Folders – View all folders in a specified OneDrive location.
Custom API Call – Make specialized requests to the Microsoft Graph API.
How to Upload Files in OneDrive
Step 1: Connect to Microsoft OneDrive
From the 'Connection' dropdown, click on 'Create connection'.
If creating a new connection, provide:
A descriptive 'Connection Name'
Your 'Redirect URL' for OAuth authentication
Your Microsoft 'Client ID'
Your Microsoft 'Client Secret'
Click 'Connect' to authenticate with your Microsoft account, then 'Save' to create the connection.
Step 2: Configure File Details
In the 'File name' field, enter the name you want the file to have in OneDrive. Include the appropriate file extension (e.g., file.txt, document.pdf, image.jpg).
Step 3: Select File to Upload
In the 'File' field, upload the file you want to store in OneDrive. You can either upload a new file or select one from a previous step in your workflow.
Step 4: Choose Destination
From the 'Parent Folder' dropdown, select where in OneDrive you want to store the file. This displays available folders in your OneDrive account.
How to Download Files from OneDrive
Step 1: Connect to Microsoft OneDrive
For connecting to your Microsoft OneDrive account, follow the first step in the "How to Upload Files in OneDrive" section above.
Step 2: Specify Target File
In the 'File ID' field, enter the unique identifier of the file you want to download.
How to List Files in OneDrive Directories
Step 1: Connect to Microsoft OneDrive
For connecting to your Microsoft OneDrive account, follow the first step in the "How to Upload Files in OneDrive" section above.
Step 2: Select Target Location
In the 'Parent Folder' field, specify the OneDrive folder whose files you want to list. You can use the folder's ID or leave it empty to list files in the root directory.
How to List Folders in OneDrive
Step 1: Connect to Microsoft OneDrive
For connecting to your Microsoft OneDrive account, follow the first step in the "How to Upload Files in OneDrive" section above.
Step 2: Select Target Location
Follow the same steps as in "How to List Files in OneDrive Directories", but instead of listing files, this will retrieve the folder structure.
How to Make a Custom API Call to OneDrive in ZBrain Flow
Step 1: Connect to Microsoft OneDrive
For connecting to your Microsoft OneDrive account, follow the first step in the "How to Upload Files in OneDrive" section above.
Step 2: Specify API Endpoint
In the 'URL' field, enter the Microsoft Graph API base URL with the specific endpoint you want to access. The default is "https://graph.microsoft.com/v1.0/me/drive" which should be extended with endpoints related to OneDrive resources.
Step 3: Select Request Method
From the 'Method' dropdown, choose the appropriate HTTP method (GET, POST, PUT, DELETE, etc.).
Step 4: Configure Headers (Optional)
Click 'Add Item' in the 'Headers' section to add any custom headers. Note that authorization headers are automatically injected from your connection.
Step 5: Add Query Parameters (Optional)
Click 'Add Item' in the 'Query Parameters' section to add URL parameters.
Step 6: Provide Request Body (Optional)
For POST, PUT, or PATCH requests, enter the JSON data to send in the 'Body' field.
Step 7: Set Error Handling (Optional)
Enable 'No Error on Failure' if you want the flow to continue even if the API request fails.
Set a 'Timeout' value in seconds to limit the request duration.
Last updated