Documentation

OneDrive Integration

How to connect OneDrive to InkRider, browse cloud files, and access them from Python code.

InkRider can connect to your Microsoft OneDrive account and make your cloud files available inside the add-in. Connected files are accessible from the Cloud Storage tool and from Python code running in any InkRider notebook.

⚠️ Strategic Storage Note: While InkRider's local IndexedDB VFS allows storage to grow very large, it is subject to manual, automatic, or policy-based browser cache erasure in Microsoft Edge WebView2 environments. OneDrive Integration provides the perfect permanent storage solution for large datasets, heavy Excel spreadsheets, and enterprise archives that cannot be safely embedded in the Word document itself.

This is a Professional plan feature.


What You Can Do

  • Browse OneDrive files and folders from the Cloud Storage panel inside InkRider.
  • Read and write OneDrive files from Python using standard file paths (e.g., open("/drive/cloud/report.csv")).
  • Share files between multiple documents using a shared folder mounted at /drive/cloud/shared/.
  • Upload local files to OneDrive and download OneDrive files through the Cloud Storage UI.

Connecting OneDrive

  1. Open the Cloud Storage tool from the tools panel (cloud icon).
  2. Click Connect OneDrive.
  3. A Microsoft login window opens. Sign in with the account that owns the OneDrive you want to use.
  4. Grant the requested permissions (read/write access to the InkRider app folder inside OneDrive).

After connecting, the Cloud Storage panel shows your OneDrive files and the connection status.

InkRider stores only the OAuth token needed to make Graph API calls on your behalf, not your password or full account data. The token is refreshed automatically in the background.


Folder Layout on OneDrive

InkRider uses an app-specific folder inside your OneDrive:

OneDrive/Apps/InkRider/
├── cloud/
│   ├── shared/           ← shared across all documents
│   └── docs/
│       ├── {documentId}/  ← document-specific files
│       └── ...

This keeps InkRider's files isolated from the rest of your OneDrive and prevents accidental access to unrelated folders.


Accessing Files from Python

When OneDrive is connected, InkRider mounts it into the Python runtime at /drive/cloud/. You can use ordinary Python file operations:

# Read a shared CSV
import pandas as pd
df = pd.read_csv("/drive/cloud/shared/quarterly_data.csv")

# Read a document-specific JSON config
import json
with open("/drive/cloud/config.json") as f:
    config = json.load(f)

# Write results back to OneDrive
df.to_csv("/drive/cloud/results.csv", index=False)

Path Mapping

Python path OneDrive location
/drive/cloud/ OneDrive/Apps/InkRider/cloud/docs/{currentDocumentId}/
/drive/cloud/shared/ OneDrive/Apps/InkRider/cloud/shared/

The document-specific root (/drive/cloud/) is scoped to the active document, so notebooks in different documents see different cloud roots even if they run on the same machine.

The shared root (/drive/cloud/shared/) is the same across all documents, which is useful for utility scripts, lookup tables, and shared data that multiple documents need.


The Cloud Storage Tool

The Cloud Storage tool provides a file browser UI for OneDrive inside the add-in. From there you can:

  • navigate the InkRider app folder tree
  • upload a local file to a specific OneDrive path
  • download an OneDrive file to your machine
  • delete files and create folders
  • view file sizes and last-modified timestamps

The Cloud Storage section also appears at the bottom of the VFS Explorer for quick access without switching tools.


File Types and Limitations

  • Text files (.py, .csv, .json, .md, .txt, etc.) are fully readable and writable from Python.
  • Binary files (.xlsx, .png, .pdf, etc.) can be downloaded and uploaded through the UI, and read as bytes from Python with open("/drive/cloud/file.xlsx", "rb").
  • Directory listings are cached for the session duration. If you upload a file outside InkRider (e.g., from the OneDrive web app) and want it to appear immediately, use the Refresh button in the Cloud Storage panel.

Disconnecting

Open the Cloud Storage panel and click Disconnect. InkRider removes the stored OAuth token. Existing notebooks that read from /drive/cloud/ will get file-not-found errors until OneDrive is reconnected.


Troubleshooting

Files are not visible after upload.
Use the Refresh button in the Cloud Storage panel to force a fresh directory listing.

Connection fails with an auth error.
Disconnect and reconnect to trigger a fresh login. Make sure you are signing into the same Microsoft account that owns the OneDrive.

Python gets a permission error when reading a file.
Confirm the file exists in the expected OneDrive path by checking the Cloud Storage panel. Paths are case-sensitive.