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

# Watch Location

- Component: `appmixer.microsoft.sharepoint.WatchLocation`
- Kind: Trigger
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.microsoft.sharepoint 3.1.0](https://connectors.appmixer.com/connector/appmixer.microsoft.sharepoint/3.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.microsoft.sharepoint/3.1.0/component/appmixer.microsoft.sharepoint.WatchLocation>

This trigger fires every time there's a new file uploaded.

## Properties

| Field | Type | Description |
| --- | --- | --- |
| Site ID (`siteId`) | text | Provide a site ID. |
| Drive ID (`driveId`) | text | ID of the drive where the file is located. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Status (`status`) | string | - |
| Created Date Time (`createdDateTime`) | string | - |
| Id (`id`) | string | - |
| Last Modified Date Time (`lastModifiedDateTime`) | string | - |
| Name (`name`) | string | - |
| Web Url (`webUrl`) | string | - |
| Size (`size`) | number | - |
| Last Modified By (`lastModifiedBy`) | object | - |
| Parent Reference (`parentReference`) | object | - |
| File (`file`) | object | - |
| File System Info (`fileSystemInfo`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.microsoft.sharepoint.WatchLocation",
  "label": "Watch Location",
  "author": "Appmixer <info@appmixer.com>",
  "description": "This trigger fires every time there's a new file uploaded.",
  "version": "1.0.0",
  "private": false,
  "webhook": true,
  "tick": true,
  "auth": {
    "service": "appmixer:microsoft",
    "scope": [
      "Files.Read.All",
      "Sites.Read.All"
    ]
  },
  "properties": {
    "schema": {
      "properties": {
        "siteId": {
          "type": "string"
        },
        "driveId": {
          "type": "string"
        }
      }
    },
    "inspector": {
      "inputs": {
        "siteId": {
          "type": "text",
          "label": "Site ID",
          "index": 1,
          "tooltip": "Provide a site ID.",
          "source": {
            "url": "/component/appmixer/microsoft/sharepoint/ListSites?outPort=out",
            "data": {
              "transform": "./ListSites#sitesToSelectArray"
            }
          }
        },
        "driveId": {
          "type": "text",
          "index": 2,
          "label": "Drive ID",
          "tooltip": "ID of the drive where the file is located.",
          "source": {
            "url": "/component/appmixer/microsoft/sharepoint/ListDrives?outPort=out",
            "data": {
              "messages": {
                "in/siteId": "properties/siteId"
              },
              "transform": "./ListDrives#drivesToSelectArray"
            }
          }
        }
      }
    }
  },
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Status",
          "value": "status",
          "schema": {
            "type": "string",
            "enum": [
              "new",
              "modified"
            ],
            "example": "modified"
          }
        },
        {
          "label": "Created Date Time",
          "value": "createdDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T09:41:27Z"
          }
        },
        {
          "label": "Id",
          "value": "id",
          "schema": {
            "type": "string",
            "example": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"
          }
        },
        {
          "label": "Last Modified Date Time",
          "value": "lastModifiedDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T10:05:13Z"
          }
        },
        {
          "label": "Name",
          "value": "name",
          "schema": {
            "type": "string",
            "example": "Q3-report.pdf"
          }
        },
        {
          "label": "Web Url",
          "value": "webUrl",
          "schema": {
            "type": "string",
            "example": "https://contoso.sharepoint.com/sites/Marketing/Shared%20Documents/Reports/Q3-report.pdf"
          }
        },
        {
          "label": "Size",
          "value": "size",
          "schema": {
            "type": "number",
            "example": 184213
          }
        },
        {
          "label": "Last Modified By",
          "value": "lastModifiedBy",
          "schema": {
            "type": "object",
            "properties": {
              "user": {
                "type": "object",
                "title": "Last Modified By.User",
                "properties": {
                  "email": {
                    "type": "string",
                    "title": "Last Modified By.User.Email"
                  },
                  "id": {
                    "type": "string",
                    "title": "Last Modified By.User.ID"
                  },
                  "displayName": {
                    "type": "string",
                    "title": "Last Modified By.User.Display Name"
                  }
                }
              }
            },
            "example": {
              "user": {
                "email": "megan.bowen@contoso.com",
                "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                "displayName": "Megan Bowen"
              }
            }
          }
        },
        {
          "label": "Parent Reference",
          "value": "parentReference",
          "schema": {
            "type": "object",
            "properties": {
              "driveType": {
                "type": "string",
                "title": "Parent Reference.Drive Type"
              },
              "driveId": {
                "type": "string",
                "title": "Parent Reference.Drive ID"
              },
              "id": {
                "type": "string",
                "title": "Parent Reference.ID"
              },
              "path": {
                "type": "string",
                "title": "Parent Reference.Path"
              },
              "siteId": {
                "type": "string",
                "title": "Parent Reference.Site ID"
              }
            },
            "example": {
              "driveType": "documentLibrary",
              "driveId": "b!-RIj2DuyvEyV1T4NlOaMHk8XkS_I8MdFlUCq1BlcjgmhRfAj3-Z8RY2VpuvV_tpd",
              "id": "01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB",
              "path": "/drives/b!-RIj2DuyvEyV1T4NlOaMHk8XkS_I8MdFlUCq1BlcjgmhRfAj3-Z8RY2VpuvV_tpd/root:/Reports",
              "siteId": "2c712604-1370-44e7-a1f5-426573fda80a"
            }
          }
        },
        {
          "label": "File",
          "value": "file",
          "schema": {
            "type": "object",
            "properties": {
              "mimeType": {
                "type": "string",
                "title": "File.Mime Type"
              },
              "hashes": {
                "type": "object",
                "title": "File.Hashes",
                "properties": {
                  "quickXorHash": {
                    "type": "string",
                    "title": "File.Hashes.Quick Xor Hash"
                  }
                }
              }
            },
            "example": {
              "mimeType": "application/pdf",
              "hashes": {
                "quickXorHash": "dF5ZsBeIxH2TmGCKUf6Pk9PMUkE="
              }
            }
          }
        },
        {
          "label": "File System Info",
          "value": "fileSystemInfo",
          "schema": {
            "type": "object",
            "properties": {
              "createdDateTime": {
                "type": "string",
                "title": "File System Info.Created Date Time"
              },
              "lastModifiedDateTime": {
                "type": "string",
                "title": "File System Info.Last Modified Date Time"
              }
            },
            "example": {
              "createdDateTime": "2026-03-12T09:41:27Z",
              "lastModifiedDateTime": "2026-03-12T10:05:13Z"
            }
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
