D: OneDrive + n8n = Productivity Heaven! β¨
If you’re looking to automate file management between Microsoft OneDrive and other apps, n8n’s OneDrive node is your golden ticket. This comprehensive guide will walk you through setup, troubleshooting, and 10 real-world automations to save hours of manual work.
π§ Part 1: Setting Up OneDrive Node in n8n
Step 1: Create Azure App Registration
- Go to Azure Portal β App Registrations β New Registration.
- Name your app (e.g., “n8n-OneDrive”) and select Accounts in any organizational directory.
- After creation, note the Application (Client) ID and Directory (Tenant) ID.
Step 2: Configure API Permissions
Under API Permissions, add:
Files.ReadWrite
(for file uploads/downloads)User.Read
(basic profile access)
π Pro Tip: Grant admin consent if youβre an admin!
Step 3: Generate Client Secret
- Navigate to Certificates & Secrets β New Client Secret.
- Copy the secret value immediately (itβs only shown once!).
Step 4: Configure n8n OneDrive Node
In n8n:
- Resource: OneDrive
- Operation: Upload, Download, etc.
- Authentication: OAuth2
- Credentials: Paste
Client ID
,Tenant ID
, andClient Secret
.
Test Connection: Try listing files to verify setup!
β‘ Part 2: 10 Killer OneDrive Automations
1οΈβ£ Auto-Save Email Attachments to OneDrive
- Tools: Gmail/Outlook β OneDrive
- Use Case: Save invoices or contracts automatically.
Trigger: New Email (Subject contains "Invoice") Action: OneDrive Upload (to /Invoices/)
2οΈβ£ Sync OneDrive β Google Drive
- Tools: OneDrive β Google Drive
- Use Case: Backup critical files across platforms.
3οΈβ£ Auto-Convert Uploaded Files to PDF
- Tools: OneDrive β PDF Converter (e.g., LibreOffice)
- Example: Convert
.docx
reports to PDF on upload.
4οΈβ£ Slack Notifications for New Files
- Tools: OneDrive β Slack
- Message: βπ New file uploaded: {{fileName}}β
5οΈβ£ Auto-Organize Files with Rules
- Logic: Move files to folders based on name/extension.
.jpg
β/Images
.xlsx
β/Reports
6οΈβ£ Backup SQL Database to OneDrive
- Tools: MySQL β OneDrive
- Schedule: Daily at 2 AM.
7οΈβ£ Extract Text from Images (OCR)
- Flow: OneDrive (image) β OCR API β OneDrive (text file).
8οΈβ£ Auto-Delete Old Files
- Logic: Delete files older than 90 days in
/Temp/
.
9οΈβ£ Generate Share Links for New Files
- Action: Create a shareable link β Email it via Outlook.
π Sync OneDrive β Airtable
- Use Case: Track file metadata (e.g., upload dates) in Airtable.
π Troubleshooting Common Issues
- Error: βPermissions Not Grantedβ β Recheck Azure API permissions.
- OAuth Token Expired β Refresh credentials in n8n.
- Slow Uploads β Check file size (n8n has a 5MB default limit).
π Why This Matters
Automating OneDrive with n8n cuts repetitive tasks by 80%+. Whether youβre a solo entrepreneur or a team, these workflows ensure files are always where they should beβwithout manual effort.
π Ready to automate? Dive into n8nβs community workflows for inspiration!
π¬ Your Turn: Which automation will you try first? Comment below! π
#n8n #Microsoft #OneDrive #Automation #NoCode