Microsoft OneDrive lets you store your personal files in one place, share them with others, and get to them from any device.
Go to siteThe Microsoft OneDrive API taps into the robust file storage and management capabilities of OneDrive, allowing for operations like file uploads, retrievals, sharing, and synchronization. Integrating this API into Pipedream workflows lets you automate tasks involving file management, content collaboration, and data backup processes. With OneDrive's API on Pipedream, you can streamline document workflows, trigger actions based on file changes, and connect your file storage to countless other services for enhanced productivity.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
microsoft_onedrive: {
type: "app",
app: "microsoft_onedrive",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://graph.microsoft.com/v1.0/me`,
headers: {
Authorization: `Bearer ${this.microsoft_onedrive.$auth.oauth_access_token}`,
},
})
},
})
Automated Backup of New Database Entries: When new data is added to a database (such as Airtable or Google Sheets), trigger a Pipedream workflow that converts this data into a CSV file and automatically uploads it to a specified folder in OneDrive for safekeeping and archiving.
Document Distribution on File Upload: Upon uploading a new document to a OneDrive folder, use a Pipedream workflow to automatically distribute the file via email (using SendGrid or Gmail) to a predefined list of recipients, ensuring team members receive the latest versions of important documents instantly.
Social Media Photo Sync: Sync new photos from a social media platform (like Instagram or Twitter) to a OneDrive album using Pipedream. Whenever a new photo is posted to your social media account, the workflow grabs the image and saves it to OneDrive, creating a backup and making it easy to access and share your social media content.
Create a sharing link for a DriveItem. See the documentation
Download a file stored in OneDrive. See the documentation
Search for a file or folder by name. See the documentation
Retrieve a table from an Excel spreadsheet stored in OneDrive See the documentation
Microsoft OneDrive uses OAuth authentication. When you connect your Microsoft OneDrive account, Pipedream will open a popup window where you can sign into Microsoft OneDrive and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Microsoft OneDrive API.
Pipedream requests the following authorization scopes when you connect your account:
User.Read
email
offline_access
openid
profile
Files.Read
Files.Read.All
Files.ReadWrite
GET
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://login.microsoftonline.com/common/oauth2/v2.0/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
&
scope={{oauth.space_separated_scopes}}
POST
https://login.microsoftonline.com/common/oauth2/v2.0/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}