> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/sharepoint/bulk-create-items-in-list.md).

# Bulk Create Items In List

Reads a CSV file from the OctoXLabs server and creates one SharePoint list item for each row, sending the items to Microsoft Graph in batches. Unlike the other SharePoint jobs it does not read the matched assets: the data comes from the file.

### Before you begin

* A Microsoft Entra (Azure AD) app registration: its tenant ID, client ID and client secret. The job signs in with the client credentials flow against Microsoft Graph.
* A SharePoint site and list reachable through that app.
* Connection values can be saved once as defaults. See [Action Center Settings](broken://pages/cc784ab7cf7754a10fa01950ebaf27cc37a8a8df), group **SharePoint**, one tab per job.
* Accepted asset types: device, user.
* Required columns: none.
* The CSV file must exist on the OctoXLabs server inside the media directory. Other locations must be allowed by an administrator through `WORKFLOW_FILE_ROOTS`.
* The first row of the CSV is the header. Use list column display names or internal names as headers.

### Settings

| Setting              | Type             | Required | Default    | Description                                                                                            |
| -------------------- | ---------------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------ |
| Tenant ID            | Text             | Yes      | None       | Microsoft Entra (Azure AD) tenant ID.                                                                  |
| Client ID            | Text             | Yes      | None       | Application (client) ID from Azure.                                                                    |
| Client Secret        | Text (sensitive) | Yes      | None       | Client secret value from Azure. Masked after saving.                                                   |
| SharePoint Domain    | Text             | Yes      | None       | Your SharePoint domain, for example `example-my.sharepoint.com`.                                       |
| Folder Type          | Text             | No       | `personal` | Folder type in SharePoint, for example `personal` or `marketing`.                                      |
| Site Address         | Text             | Yes      | None       | Site address path, for example `jdoe_example_com`.                                                     |
| List Name            | Text             | Yes      | None       | Name of the SharePoint list.                                                                           |
| Timeout              | Integer          | No       | 30         | Request timeout in seconds. This field has no label in the serializer, so the console name may differ. |
| CSV File Path        | Text             | Yes      | None       | Path to the CSV file inside the media directory, for example `/app/media/exports/assets.csv`.          |
| Hostname/Title Field | Text             | No       | `Title`    | CSV column name to use as the SharePoint Title field, for example `Title` or `Hostname`.               |

### How it works

The job requests a Microsoft Graph token, resolves the site from **SharePoint Domain**, **Folder Type** and **Site Address**, then resolves the list from **List Name**. It then reads the list columns to map display names to internal names.

Each CSV row becomes one item. The value of the **Hostname/Title Field** column is written to `Title`. Other columns are matched to list columns by display name, then by internal name; unrecognised columns are skipped with a warning and empty cells are ignored. Rows with no usable fields are skipped and counted as failed.

Items are sent in batches of 20 through the Graph `$batch` endpoint. If a whole batch request fails, all items in it count as failed. Individual item failures are logged and do not stop the job.

A missing, unreadable or empty file is logged as an error and the job ends without creating items. At the end the job logs success, failed and total counts, and reports success when at least one item was created.

### Example

```
Tenant ID:          00000000-0000-0000-0000-000000000000
Client ID:          YOUR_CLIENT_ID
Client Secret:      YOUR_CLIENT_SECRET
SharePoint Domain:  example.sharepoint.com
Folder Type:        sites
Site Address:       it-assets
List Name:          Assets
CSV File Path:      /app/media/exports/assets.csv
Hostname/Title Field:  Hostname
```

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/a6adb736a528d63d9d04b466e73ca8bd9446ec02">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/cc784ab7cf7754a10fa01950ebaf27cc37a8a8df">Broken link</a></td></tr><tr><td><strong>Create Item In List</strong></td><td>Create items directly from matched assets.</td><td><a href="broken://pages/a70327fc5414ea35806b8a68f5e16cbc039c2afc">Broken link</a></td></tr></tbody></table>
