Sites
Sites helps you find the SharePoint sites you have access to: it lists them or searches them by name, looks up the details of a specific site or of your organisation’s main site, and returns a site’s document libraries.
It is usually a first step for Documents or Lists: it gives you the identifiers of the site and its libraries that those components need when you type them by hand.
When to use it
- An AI agent needs to find out which SharePoint site holds a department’s documentation.
- You want the identifiers of a site and its libraries to use them in other components.
- You need a list of the sites an account has access to.
- You want to know how much space a site’s libraries take up.
Configuration
You need a Microsoft Shared Point credential, which connects by signing in with your Microsoft account. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Microsoft Shared Point credential used to access your sites. |
| Operation (required) | What the component does. See Operations. By default, Get Sites. |
| Search Query | Text to search for sites. You can use plain words (project), * for every accessible site, displayName:Reports or title:Marketing to search by name or title, or a site’s full address. If you leave it empty, all your sites are listed. Only in Get Sites. |
| Results Count | The maximum number of sites returned. By default, 50. Only in Get Sites. |
| Site ID or Name | The site’s identifier or name. In Get Site by Identifier and Get Site Drives. |
Operations
| Operation | What it does |
|---|---|
Get Sites | Lists your sites or, if you type a text in Search Query, the ones that match it. |
Get Site by Identifier | Returns the details of a specific site. |
Get Root Site | Returns the details of your organisation’s main site. |
Get Site Drives | Returns a site’s document libraries, with their identifier, name, type, link and total, used and remaining space. |
Output
The Data output returns one item for each site or library, with its identifier, name, display name, description, link and creation and modification dates. If an operation fails, the output contains an item with the error message instead of stopping the flow.
You can pass the identifiers to Documents or Lists with Mode set to By Manual Entry. The component can also be connected to an Agent as a tool, so the agent decides which site to look in. See Tool Mode.
Example
A company wants an assistant that finds documents in each department’s SharePoint site.
- Add an Agent and connect Sites to it as a tool, with the company’s Microsoft Shared Point credential.
- Also connect Documents as a tool, with Mode set to
By Manual Entry. - When someone asks for the Human Resources documents, the agent finds the site with
Get Sites, gets its libraries withGet Site Drivesand lists the documents with Documents.