Connect Codex to OneDrive
Give your Codex agent access to OneDrive in Melso — 81 tools it can call while it works through a task.
Set it up in Melso
- 1In Melso, open Settings → Agent Apps and hit Connect on OneDrive.
- 2Finish the OAUTH2 / S2S_OAUTH2 sign-in in the window that opens. Melso stores the connection, not your credentials.
- 3Open your Codex agent, go to its Agent Apps tab, and allow OneDrive.
- 4Give the agent a task. It calls OneDrive itself when the work needs it.
What OneDrive gives your agent
The tools, permissions, and events OneDrive exposes — the same ones your agent can use once the app is authorized.
What you sign in with
OneDrive connects with OAUTH2 / S2S_OAUTH2.
- Client id
- Client secret
- Tenant ID
Permissions
Tools OneDrive exposes
Add Workbook Worksheet
Adds a new worksheet to an existing Excel workbook in OneDrive or SharePoint. The worksheet is created with the specified name and appended to the end of the workbook's worksheet collection. Use this action when you need to create a new sheet in an Excel file to organize data, add reports, or separate information into logical sections.
Check In Drive Item
Tool to check in a checked out driveItem resource, making the version of the document available to others. Use when you need to check in a file that was previously checked out in OneDrive or SharePoint.
Checkout Drive Item
Tool to check out a driveItem to prevent others from editing it and make your changes invisible until checked in. Use when you need to lock a file for exclusive editing in SharePoint or OneDrive.
Clear Workbook Range
Clears values, formats, or both from a worksheet range in an Excel workbook stored in OneDrive or SharePoint without deleting cells or shifting neighboring data. Use this action when you need to reset a range while preserving the worksheet's cell structure.
Copy Item
Tool to copy a DriveItem (file or folder) to a new location asynchronously. Use when you need to duplicate an item, optionally renaming it or specifying a different parent folder. The operation is asynchronous; the response provides a URL to monitor the copy progress. Do not assume the copy is complete immediately; verify via ONE_DRIVE_GET_ITEM or by listing the destination, especially for large folder trees.
Create Drive Item Permission
Tool to create a new permission on a OneDrive drive item. Use when you need to grant application or SharePoint group permissions to a file or folder. This endpoint supports creating application permissions and SharePoint site group permissions only.
Create Sharing Link
Tool to create a sharing link for a DriveItem (file or folder) by its unique ID. Use when you need to generate a shareable link for an item in OneDrive or SharePoint.
Create SharePoint List Item
Create an item in a SharePoint list using Microsoft Graph through the OneDrive connection. Use when you need to add a new row/item to a SharePoint list after resolving the site ID and list ID.
Events your agent can react to
Onedrivebasetrigger
Base trigger for OneDrive changes using Gmail-style state management. Subclasses override `filter_changes(...)` to extract only the relevant items.
OneDrive File Created Trigger
Triggers when a new file is created in OneDrive. Uses Gmail-style state management for reliable duplicate prevention.
File Updated
Trigger that fires when a OneDrive file's content or metadata changes. Returns file ID, last modified time, and modifier info.
OneDrive Folder Created Trigger
Triggers when a new folder is created in OneDrive. Uses Gmail-style state management for reliable duplicate prevention.
OneDrive Item Deleted Trigger
Triggers when a file or folder is deleted in OneDrive. Uses Gmail-style state management for reliable duplicate prevention.
Item Moved or Renamed
Triggers when a file or folder is moved to a different path or renamed in OneDrive. Includes both old and new path/name data in the payload.