# Microsoft SharePoint

> Manage SharePoint lists and files: create lists, add and update list items, and upload files.

App · File Storage · 6 actions. Web page: https://docs.lodol.com/docs/integrations/microsoft-sharepoint

## Actions

### Add list item

Add a new item to a SharePoint list.

**Inputs**

- Site ID (`site_id`, text, required): The web address of your SharePoint site (for example, contoso.sharepoint.com).
- List ID (`list_id`, text, required): The SharePoint list ID.
- Fields (`fields`, object, required): The column values for the new item. A basic list only has a 'Title' column; custom columns must be added to the list before they can be used.

**Outputs**

- `fields` (object): Item fields.
- `id` (text): Item ID.

**Example output**

```json
{
  "fields": {},
  "id": "item123"
}
```

### Create list

Create a new SharePoint list in a site.

**Inputs**

- Site ID (`site_id`, text, required): The web address of your SharePoint site (for example, contoso.sharepoint.com).
- List name (`list_name`, text, required): Name for the list.
- Description (`description`, text): Optional list description.
- Template (`template`, text): Optional type of list to create, such as genericList or documentLibrary.

**Outputs**

- `displayName` (text): List name.
- `id` (text): List ID.

**Example output**

```json
{
  "displayName": "New List",
  "id": "list123"
}
```

### Delete list item

Delete an item from a SharePoint list.

**Inputs**

- Site ID (`site_id`, text, required): The web address of your SharePoint site (for example, contoso.sharepoint.com).
- List ID (`list_id`, text, required): The SharePoint list ID.
- Item ID (`item_id`, text, required): The item ID to delete.

**Outputs**

- `deleted` (true/false): Whether deletion succeeded.

**Example output**

```json
{
  "deleted": true
}
```

### Get list items

Get items from a SharePoint list.

**Inputs**

- Site ID (`site_id`, text, required): The web address of your SharePoint site (for example, contoso.sharepoint.com).
- List ID (`list_id`, text, required): The SharePoint list ID.
- Maximum items (`top`, number): Optional limit for the number of items to return.
- Filter query (`filter_query`, text): Optional filter to narrow the results, written as an OData $filter (for example, fields/Title eq 'Invoice').

**Outputs**

- `value` (list): List of items.

**Example output**

```json
{
  "value": [
    {
      "id": "item1"
    }
  ]
}
```

### Update list item

Update an existing item in a SharePoint list.

**Inputs**

- Site ID (`site_id`, text, required): The web address of your SharePoint site (for example, contoso.sharepoint.com).
- List ID (`list_id`, text, required): The SharePoint list ID.
- Item ID (`item_id`, text, required): The item ID to update.
- Fields (`fields`, object, required): The column values to update. A basic list only has a 'Title' column; custom columns must already exist on the list.

**Outputs**

- `fields` (object): Updated fields.
- `id` (text): Item ID.

**Example output**

```json
{
  "fields": {},
  "id": "item123"
}
```

### Upload file

Upload a file to a SharePoint document library.

**Inputs**

- Site ID (`site_id`, text, required): The web address of your SharePoint site (for example, contoso.sharepoint.com).
- File (`file_path`, text, required): The file to upload. Use a file from an earlier step in your workflow.
- Folder path (`folder_path`, text): Optional folder in the site's document library to upload into (for example, Reports/2026).
- Conflict behavior (`conflict_behavior`, text): What to do if a file with the same name already exists: rename, replace, or fail.

**Outputs**

- `id` (text): Item ID.
- `name` (text): File name.
- `webUrl` (text): Web URL.

**Example output**

```json
{
  "id": "file123",
  "name": "file.txt",
  "webUrl": "https://..."
}
```
