Documents
Documents works with the document libraries of your SharePoint sites: it lists the files and folders in a path, uploads files, creates folders, looks up an item’s details, shares it with other people or deletes it.
Use it when your company keeps its shared documentation in SharePoint and a flow needs to store what it produces there or look at what is already there.
When to use it
- You want to file every invoice or contract the flow processes in the department’s library.
- When a project starts, you want to create its folder in the team’s SharePoint site.
- An AI agent needs to list the documents in a folder to choose which one to read.
- You need to share a document with an external collaborator without opening SharePoint.
Configuration
You need a Microsoft Shared Point credential, which connects by signing in with your Microsoft account. When you create it you choose the access level: with Read Only you can only read; to upload, create, share or delete, choose Full Access. 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 Drive Items. |
| Mode | How you point to where to work: By Selector (you pick site, library, folder and item from a list) or By Manual Entry (you type their identifiers and paths). By default, By Selector. |
| Site (required) | The SharePoint site. The list loads when you choose the credential. |
| Library/Drive (required) | The site’s document library. |
| Path (required) | The folder in the library, for example /Documents/Reports. You can pick it from the list or type it. In Get Drive Items, Upload File and Create Folder. |
| Item Type | Which items are considered: Files & Folders, Files only or Folders only. By default, Files & Folders. In Get Drive Items and in the operations on a single item. |
| Search Items | A name or a word to filter the Items list. After typing it, click the reload button on Items. In Delete Item, Share Item and Get Item Metadata. |
| Items (required) | The file or folder you work with. In Delete Item, Share Item and Get Item Metadata. |
| Depth Limit | How many levels of subfolders are explored: 1 only looks at the folder’s direct contents, 2 goes one level of subfolders deep, and so on. It affects the Path and Items lists and the result of Get Drive Items. By default, 1. After changing it, pick the library again or reload Items. |
| File Name | The name the uploaded file is saved with. If you leave it empty, the original name is used. Only in Upload File. |
| File Content (required) | The file to upload. Connect the output of a component that delivers files, or type a file’s web address. Only in Upload File. |
| Folder Name (required) | The name of the new folder. Only in Create Folder. |
| Share Recipients (required) | The email addresses of the people you share with, separated by commas. Only in Share Item. |
| Share Role | What they can do: read (view), write (edit) or owner. By default, read. Only in Share Item. |
| Share Message | An optional message for the people you share with. Only in Share Item. |
| File Types Filter | File extensions separated by commas to keep only those files, for example .pdf,.docx. Only in Get Drive Items. |
| Items Count | The maximum number of items returned. By default, 100. Only in Get Drive Items. |
With Mode set to By Manual Entry, the lists are replaced by text fields: Site ID (the site’s identifier), Document Library (the library’s identifier), Folder Path (the folder’s path; by default, /) and Item ID (the identifier of the file or folder). You can get these identifiers with Sites and with Get Drive Items.
Operations
| Operation | What it does |
|---|---|
Get Drive Items | Lists the files and folders in a path, with their identifier, name, size, link, download link, dates, type and the folder they are in. |
Upload File | Uploads one or more files to the given folder. |
Create Folder | Creates a folder inside the given folder. |
Delete Item | Deletes a file or a folder. |
Share Item | Shares a file or a folder with one or more people. |
Get Item Metadata | Returns the details of a file or a folder: size, links, dates, who created it and who last modified it. |
Output
The Data output returns one item for each file or folder listed or uploaded, or a single item with the result of the operation, such as the folder created, the confirmation of the deletion or the details of the shared item. If an operation fails, the output contains an item with the error message instead of stopping the flow.
You can connect the result to an agent so it chooses or reads documents, or to an email component to send links. The component can also be connected to an Agent as a tool, so the agent decides when to look up or save documents. See Tool Mode.
Example
A company’s accounts department wants to file in SharePoint every supplier invoice that arrives by email.
- An email component delivers the PDF of each invoice received.
- Add Documents with the
Upload Fileoperation and the accounts department’s Microsoft Shared Point credential. - In Site, pick the Accounts site; in Library/Drive, the document library; and in Path,
/Invoices/2026. - Connect the PDF to File Content.
Good practices
- Raise Depth Limit only if you need to: the more levels, the longer the lists and the operation take to load.
- For an agent to work in different folders on each run, use
By Manual Entryand give it the path. Delete Itemdoes not ask for confirmation, and deleting a folder deletes everything in it.