> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.microsoft.onedrive.CreateFolder

- Component: `appmixer.microsoft.onedrive.CreateFolder`
- Kind: Action
- Version: 1.1.0
- Visibility: Public
- Connector: [appmixer.microsoft.onedrive 1.6.0](https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.microsoft.onedrive/1.6.0/component/appmixer.microsoft.onedrive.CreateFolder>

Create a folder in Microsoft OneDrive.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Drive (`drive`) | select | Select the drive type. |
| Drive ID (`driveId`) | text | ID of the drive where the file is located. |
| Site ID (`siteId`) | text | ID of the site where the file is located. |
| Group ID (`groupId`) | text | ID of the group where the file is located. |
| User ID (`userId`) | text | ID of the user where the file is located. |
| Parent ID (`parentId`) | text | Specify the ID of the parent folder. Leave empty to use 'root' as the parent. |
| Parent Path (`parentPath`) | text | Specify the path of the parent folder**(Ignored if 'Parent ID' is set)**. Leave empty to use 'root' as the parent. Example: `path/to/parent/folder` |
| Folder Name (`name`) | text | Specify the name of the folder to create. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Folder ID (`id`) | string | - |
| Name (`name`) | string | - |
| Created Date Time (`createdDateTime`) | string | - |
| C Tag (`cTag`) | string | - |
| E Tag (`eTag`) | string | - |
| Last Modified Date Time (`lastModifiedDateTime`) | string | - |
| Size (`size`) | number | - |
| Web URL (`webUrl`) | string | - |
| created By User ID (`createdBy.user.id`) | string | - |
| created By User DisplayName (`createdBy.user.displayName`) | string | - |
| Last Modified By ID (`lastModifiedBy.user.id`) | string | - |
| Last Modified By DisplayName (`lastModifiedBy.user.displayName`) | string | - |
| Parent Reference Drive ID (`parentReference.driveId`) | string | - |
| Parent Reference Drive Type (`parentReference.driveType`) | string | - |
| Parent Reference Drive Path (`parentReference.path`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.microsoft.onedrive.CreateFolder",
  "author": "Harsha Surisetty <harsha@client.io>",
  "description": "Create a folder in Microsoft OneDrive.",
  "version": "1.1.0",
  "dependencies": {
    "module": "1.1.0"
  },
  "private": false,
  "auth": {
    "service": "appmixer:microsoft",
    "scope": [
      "Files.ReadWrite.All"
    ]
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "driveId": {
            "type": "string"
          },
          "siteId": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "drive": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "parentPath": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "inspector": {
        "inputs": {
          "drive": {
            "type": "select",
            "index": 1,
            "label": "Drive",
            "group": "drive",
            "defaultValue": "me",
            "tooltip": "Select the drive type.",
            "options": [
              {
                "label": "My Drive",
                "value": "me"
              },
              {
                "label": "User's Drive",
                "value": "user"
              },
              {
                "label": "Site's Drive",
                "value": "site"
              },
              {
                "label": "Group's Drive",
                "value": "group"
              },
              {
                "label": "Any Drive",
                "value": "drive"
              }
            ]
          },
          "driveId": {
            "type": "text",
            "index": 2,
            "label": "Drive ID",
            "group": "drive",
            "tooltip": "ID of the drive where the file is located.",
            "when": {
              "eq": {
                "drive": "drive"
              }
            },
            "source": {
              "url": "/component/appmixer/microsoft/onedrive/ListDrives?outPort=out",
              "data": {
                "properties": {
                  "variableFetch": true
                },
                "transform": "./ListDrives#sitesToSelectArray"
              }
            }
          },
          "siteId": {
            "type": "text",
            "index": 3,
            "label": "Site ID",
            "group": "drive",
            "tooltip": "ID of the site where the file is located.",
            "when": {
              "eq": {
                "drive": "site"
              }
            },
            "source": {
              "url": "/component/appmixer/microsoft/onedrive/ListSites?outPort=out",
              "data": {
                "properties": {
                  "variableFetch": true
                },
                "transform": "./ListSites#sitesToSelectArray"
              }
            }
          },
          "groupId": {
            "type": "text",
            "index": 4,
            "label": "Group ID",
            "group": "drive",
            "tooltip": "ID of the group where the file is located.",
            "when": {
              "eq": {
                "drive": "group"
              }
            },
            "source": {
              "url": "/component/appmixer/microsoft/onedrive/ListGroups?outPort=out",
              "data": {
                "properties": {
                  "variableFetch": true
                },
                "transform": "./ListGroups#sitesToSelectArray"
              }
            }
          },
          "userId": {
            "type": "text",
            "index": 5,
            "label": "User ID",
            "group": "drive",
            "tooltip": "ID of the user where the file is located.",
            "when": {
              "eq": {
                "drive": "user"
              }
            },
            "source": {
              "url": "/component/appmixer/microsoft/onedrive/ListUsers?outPort=out",
              "data": {
                "properties": {
                  "variableFetch": true
                },
                "transform": "./ListUsers#sitesToSelectArray"
              }
            }
          },
          "parentId": {
            "type": "text",
            "index": 6,
            "label": "Parent ID",
            "group": "parent",
            "tooltip": "Specify the ID of the parent folder. Leave empty to use 'root' as the parent."
          },
          "parentPath": {
            "type": "text",
            "index": 7,
            "label": "Parent Path",
            "group": "parent",
            "tooltip": "Specify the path of the parent folder<b>(Ignored if 'Parent ID' is set)</b>. Leave empty to use 'root' as the parent. Example: <code>path/to/parent/folder</code>"
          },
          "name": {
            "type": "text",
            "index": 8,
            "label": "Folder Name",
            "tooltip": "Specify the name of the folder to create."
          }
        },
        "groups": {
          "drive": {
            "label": "Drive",
            "index": 1
          },
          "parent": {
            "label": "Parent",
            "index": 2
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Folder ID",
          "value": "id",
          "schema": {
            "type": "string",
            "example": "01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB"
          }
        },
        {
          "label": "Name",
          "value": "name",
          "schema": {
            "type": "string",
            "example": "Reports"
          }
        },
        {
          "label": "Created Date Time",
          "value": "createdDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T09:41:27Z"
          }
        },
        {
          "label": "C Tag",
          "value": "cTag",
          "schema": {
            "type": "string",
            "example": "\"c:{8C2F3A1B-5D6E-4F70-8192-A3B4C5D6E7F8},0\""
          }
        },
        {
          "label": "E Tag",
          "value": "eTag",
          "schema": {
            "type": "string",
            "example": "\"{8C2F3A1B-5D6E-4F70-8192-A3B4C5D6E7F8},1\""
          }
        },
        {
          "label": "Last Modified Date Time",
          "value": "lastModifiedDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T09:41:27Z"
          }
        },
        {
          "label": "Size",
          "value": "size",
          "schema": {
            "type": "number",
            "example": 0
          }
        },
        {
          "label": "Web URL",
          "value": "webUrl",
          "schema": {
            "type": "string",
            "example": "https://contoso-my.sharepoint.com/personal/megan_bowen_contoso_com/Documents/Reports"
          }
        },
        {
          "label": "created By User ID",
          "value": "createdBy.user.id",
          "schema": {
            "type": "string",
            "example": "48d31887-5fad-4d73-a9f5-3c356e68a038"
          }
        },
        {
          "label": "created By User DisplayName",
          "value": "createdBy.user.displayName",
          "schema": {
            "type": "string",
            "example": "Megan Bowen"
          }
        },
        {
          "label": "Last Modified By ID",
          "value": "lastModifiedBy.user.id",
          "schema": {
            "type": "string",
            "example": "48d31887-5fad-4d73-a9f5-3c356e68a038"
          }
        },
        {
          "label": "Last Modified By DisplayName",
          "value": "lastModifiedBy.user.displayName",
          "schema": {
            "type": "string",
            "example": "Megan Bowen"
          }
        },
        {
          "label": "Parent Reference Drive ID",
          "value": "parentReference.driveId",
          "schema": {
            "type": "string",
            "example": "b!t18F8ybsHUq1z3LTz8xvZqP8zaSWjkFNhsME-Fepo75dTf9vQKfeRblBZjoSQrd7"
          }
        },
        {
          "label": "Parent Reference Drive Type",
          "value": "parentReference.driveType",
          "schema": {
            "type": "string",
            "example": "business"
          }
        },
        {
          "label": "Parent Reference Drive Path",
          "value": "parentReference.path",
          "schema": {
            "type": "string",
            "example": "/drives/b!t18F8ybsHUq1z3LTz8xvZqP8zaSWjkFNhsME-Fepo75dTf9vQKfeRblBZjoSQrd7/root:"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
