Actions13
Folder → Create
AI-generatedSummary
Creates a folder at the specified path in a OneDrive Business user drive or a SharePoint document library via Microsoft Graph API.
Inputs
- driveType — Type of drive to access. 'user' accesses a personal OneDrive, 'site' accesses a SharePoint site's document library. Default: 'user'.
- userId (required) — User principal name or ID. Required when driveType is 'user'.
- siteId (required) — SharePoint site ID. Required when driveType is 'site'. Format: contoso.sharepoint.com,site-id,web-id.
- folderPath (required) — Path where to create the folder, e.g. /Documents/NewFolder. Created relative to the selected drive root.
Output shape
object
Folder item returned by Microsoft Graph API, typically containing id, name, webUrl, and parentId. Conflict behavior is set to 'fail' to prevent overwriting existing folders.
Examples
Example 1: Create a folder named 'Reports' in the user's OneDrive root.
driveType: 'user', folderPath: '/Reports'
Example 2: Create a folder named 'Projects' in a SharePoint document library.
driveType: 'site', siteId: 'contoso.sharepoint.com,site-id,web-id', folderPath: '/Projects'