> 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.UploadFile

- Component: `appmixer.microsoft.onedrive.UploadFile`
- 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.UploadFile>

Upload file into Microsoft OneDrive.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| File ID (`fileId`) | filepicker | File ID assigned to file once stored in this application or select a file from your computer. |
| File Name (`fileName`) | text | File Name |
| Folder (`folder`) | onedrivepicker | Choose a folder to upload the file to |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| File ID (`id`) | string | - |
| Name (`name`) | string | - |
| Date Created (`createdDateTime`) | string | - |
| `cTag` | string | - |
| `eTag` | string | - |
| Last Modified Date (`lastModifiedDateTime`) | string | - |
| Size (`size`) | number | - |
| Web URL (`webUrl`) | string | - |
| Reactions (`reactions`) | object | - |
| Comment Count (`reactions.commentCount`) | number | - |
| Created By (`createdBy`) | object | - |
| `createdBy.application` | object | - |
| `createdBy.application.id` | string | - |
| `createdBy.user` | object | - |
| `createdBy.user.id` | string | - |
| `createdBy.user.displayName` | string | - |
| Modified By (`lastModifiedBy`) | object | - |
| `lastModifiedBy.application` | object | - |
| `lastModifiedBy.application.id` | string | - |
| `lastModifiedBy.user` | object | - |
| `lastModifiedBy.user.id` | string | - |
| `lastModifiedBy.user.displayName` | string | - |
| Parent Reference (`parentReference`) | object | - |
| File (`file`) | object | - |
| Mime Type (`file.mimeType`) | string | - |
| File Hashes (`file.hashes`) | object | - |
| File System Info (`fileSystemInfo`) | object | - |
| Image (`image`) | object | - |
| Photo (`photo`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.microsoft.onedrive.UploadFile",
  "author": "Jimoh Damilola <jimoh@client.io>",
  "description": "Upload file into 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": {
          "isToken": {
            "type": "boolean"
          },
          "isFilePickerUpload": {
            "type": "boolean"
          },
          "fileId": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "folder": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object"
              }
            ]
          }
        },
        "oneOf": [
          {
            "required": [
              "isFilePickerUpload"
            ]
          },
          {
            "required": [
              "isToken"
            ]
          },
          {
            "required": [
              "fileId"
            ]
          }
        ]
      },
      "inspector": {
        "inputs": {
          "fileId": {
            "type": "filepicker",
            "index": 1,
            "label": "File ID",
            "tooltip": "File ID assigned to file once stored in this application or select a file from your computer."
          },
          "fileName": {
            "type": "text",
            "index": 2,
            "label": "File Name",
            "tooltip": "File Name"
          },
          "folder": {
            "type": "onedrivepicker",
            "index": 3,
            "label": "Folder",
            "placeholder": "Choose a folder...",
            "tooltip": "Choose a folder to upload the file to",
            "view": "folders"
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "File ID",
          "value": "id",
          "schema": {
            "type": "string",
            "example": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"
          }
        },
        {
          "label": "Name",
          "value": "name",
          "schema": {
            "type": "string",
            "example": "Q3-report.pdf"
          }
        },
        {
          "label": "Date Created",
          "value": "createdDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T09:41:27Z"
          }
        },
        {
          "label": "cTag",
          "value": "cTag",
          "schema": {
            "type": "string",
            "example": "\"c:{4E5F6A7B-8C9D-4E0F-A1B2-C3D4E5F6A7B8},2\""
          }
        },
        {
          "label": "eTag",
          "value": "eTag",
          "schema": {
            "type": "string",
            "example": "\"{4E5F6A7B-8C9D-4E0F-A1B2-C3D4E5F6A7B8},2\""
          }
        },
        {
          "label": "Last Modified Date",
          "value": "lastModifiedDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T10:05:13Z"
          }
        },
        {
          "label": "Size",
          "value": "size",
          "schema": {
            "type": "number",
            "example": 184213
          }
        },
        {
          "label": "Web URL",
          "value": "webUrl",
          "schema": {
            "type": "string",
            "example": "https://contoso-my.sharepoint.com/personal/megan_bowen_contoso_com/Documents/Reports/Q3-report.pdf"
          }
        },
        {
          "label": "Reactions",
          "value": "reactions",
          "schema": {
            "type": "object",
            "example": {
              "commentCount": 0
            }
          }
        },
        {
          "label": "Comment Count",
          "value": "reactions.commentCount",
          "schema": {
            "type": "number",
            "example": 0
          }
        },
        {
          "label": "Created By",
          "value": "createdBy",
          "schema": {
            "type": "object",
            "example": {
              "application": {
                "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
                "displayName": "Microsoft Teams Services"
              },
              "user": {
                "email": "megan.bowen@contoso.com",
                "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                "displayName": "Megan Bowen"
              }
            }
          }
        },
        {
          "label": "createdBy.application",
          "value": "createdBy.application",
          "schema": {
            "type": "object",
            "example": {
              "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
              "displayName": "Microsoft Teams Services"
            }
          }
        },
        {
          "label": "createdBy.application.id",
          "value": "createdBy.application.id",
          "schema": {
            "type": "string",
            "example": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe"
          }
        },
        {
          "label": "createdBy.user",
          "value": "createdBy.user",
          "schema": {
            "type": "object",
            "example": {
              "email": "megan.bowen@contoso.com",
              "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
              "displayName": "Megan Bowen"
            }
          }
        },
        {
          "label": "createdBy.user.id",
          "value": "createdBy.user.id",
          "schema": {
            "type": "string",
            "example": "48d31887-5fad-4d73-a9f5-3c356e68a038"
          }
        },
        {
          "label": "createdBy.user.displayName",
          "value": "createdBy.user.displayName",
          "schema": {
            "type": "string",
            "example": "Megan Bowen"
          }
        },
        {
          "label": "Modified By",
          "value": "lastModifiedBy",
          "schema": {
            "type": "object",
            "example": {
              "application": {
                "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
                "displayName": "Microsoft Teams Services"
              },
              "user": {
                "email": "megan.bowen@contoso.com",
                "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                "displayName": "Megan Bowen"
              }
            }
          }
        },
        {
          "label": "lastModifiedBy.application",
          "value": "lastModifiedBy.application",
          "schema": {
            "type": "object",
            "example": {
              "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
              "displayName": "Microsoft Teams Services"
            }
          }
        },
        {
          "label": "lastModifiedBy.application.id",
          "value": "lastModifiedBy.application.id",
          "schema": {
            "type": "string",
            "example": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe"
          }
        },
        {
          "label": "lastModifiedBy.user",
          "value": "lastModifiedBy.user",
          "schema": {
            "type": "object",
            "example": {
              "email": "megan.bowen@contoso.com",
              "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
              "displayName": "Megan Bowen"
            }
          }
        },
        {
          "label": "lastModifiedBy.user.id",
          "value": "lastModifiedBy.user.id",
          "schema": {
            "type": "string",
            "example": "48d31887-5fad-4d73-a9f5-3c356e68a038"
          }
        },
        {
          "label": "lastModifiedBy.user.displayName",
          "value": "lastModifiedBy.user.displayName",
          "schema": {
            "type": "string",
            "example": "Megan Bowen"
          }
        },
        {
          "label": "Parent Reference",
          "value": "parentReference",
          "schema": {
            "type": "object",
            "example": {
              "driveType": "business",
              "driveId": "b!t18F8ybsHUq1z3LTz8xvZqP8zaSWjkFNhsME-Fepo75dTf9vQKfeRblBZjoSQrd7",
              "id": "01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB",
              "path": "/drives/b!t18F8ybsHUq1z3LTz8xvZqP8zaSWjkFNhsME-Fepo75dTf9vQKfeRblBZjoSQrd7/root:/Reports"
            }
          }
        },
        {
          "label": "File",
          "value": "file",
          "schema": {
            "type": "object",
            "example": {
              "mimeType": "application/pdf",
              "hashes": {
                "quickXorHash": "dF5ZsBeIxH2TmGCKUf6Pk9PMUkE="
              }
            }
          }
        },
        {
          "label": "Mime Type",
          "value": "file.mimeType",
          "schema": {
            "type": "string",
            "example": "application/pdf"
          }
        },
        {
          "label": "File Hashes",
          "value": "file.hashes",
          "schema": {
            "type": "object",
            "example": {
              "quickXorHash": "dF5ZsBeIxH2TmGCKUf6Pk9PMUkE="
            }
          }
        },
        {
          "label": "File System Info",
          "value": "fileSystemInfo",
          "schema": {
            "type": "object",
            "example": {
              "createdDateTime": "2026-03-12T09:41:27Z",
              "lastModifiedDateTime": "2026-03-12T10:05:13Z"
            }
          }
        },
        {
          "label": "Image",
          "value": "image",
          "schema": {
            "type": "object",
            "example": {
              "height": 1080,
              "width": 1920
            }
          }
        },
        {
          "label": "Photo",
          "value": "photo",
          "schema": {
            "type": "object",
            "example": {
              "takenDateTime": "2026-03-10T14:22:05Z",
              "cameraMake": "Apple",
              "cameraModel": "iPhone 15 Pro"
            }
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
