Lists
Lists works with the lists in your SharePoint sites: it looks up the lists in a site, creates new lists, and reads, adds, updates or deletes their items.
Many companies use SharePoint lists as a simple register: incidents, holiday requests, inventory or contacts. With this component a flow can read that register or keep it up to date without anyone opening SharePoint.
When to use it
- You want to record every request that arrives through a form as a new item in a list.
- An AI agent needs to check the status of an incident stored in a list.
- When a task is resolved in another tool, you want to update its status in the SharePoint list.
- When a project starts, you want to create a task list in its site.
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 create, update 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 Site Lists. |
| Mode | How you point to the site, the list and the item: By Selector (you pick them from a list) or By Manual Entry (you type their identifiers in Site ID, List ID and List Item ID). By default, By Selector. |
| Site (required) | The SharePoint site. The list loads when you choose the credential. |
| List (required) | The list you work with. In Get List Items, Create List Item, Update List Item and Delete List Item. |
| List Item (required) | The item in the list, shown with its title and identifier. In Update List Item and Delete List Item. |
| List Name (required) | The name of the new list. Only in Create List. |
| List Template | The type of the new list: genericList (custom list), tasks, events (calendar), contacts, announcements or links. By default, genericList. Only in Create List. |
| List Description | The description of the new list. Only in Create List. |
| Items Count | The maximum number of items read. By default, 100. Used in Get List Items. |
| Filter Query | A filter to keep only some items, written the way SharePoint accepts it, for example fields/Title eq 'Printer'. Only in Get List Items. |
List columns
In Create List Item and Update List Item, once you pick the list a field appears for each column, named after the column. Fill in the ones you want to save: empty fields are not sent, so in Update List Item only the columns you fill in change. Choice columns appear as drop-downs and yes/no columns as switches. Person, lookup, hyperlink and location columns do not appear.
Operations
| Operation | What it does |
|---|---|
Get Site Lists | Returns the lists in the site, with their name, description, link, type, number of items and dates. |
Create List | Creates a new list in the site. |
Get List Items | Returns the items in a list, with each column’s value, a summary, the link, the dates and who created and modified them. |
Create List Item | Adds an item to the list with the column values. |
Update List Item | Changes the column values of an existing item. |
Delete List Item | Deletes an item from the list. |
Output
The Data output returns one item for each list or list item found, or a single item with the result of the operation, such as the list created or the confirmation of the change. 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 uses the list’s data, or to another component that processes or sends it. The component can also be connected to an Agent as a tool, so the agent decides when to look up or update the list. See Tool Mode.
Example
A company’s IT department records incidents in the Incidents list of its SharePoint site and wants the ones that arrive by email to be added automatically.
- An agent reads each support email and extracts the title, the description and the priority.
- Add Lists with the
Create List Itemoperation and the IT department’s Microsoft Shared Point credential. - In Site, pick the IT site, and in List, the
Incidentslist. - Fill in the column fields that appear, such as Title, Description and Priority, with the data the agent extracted.
Good practices
- Use Filter Query instead of reading the whole list when you only need a few items.
- If you change the list’s columns in SharePoint, pick the list again in the component so the new fields appear.
Delete List Itemdoes not ask for confirmation.