Skip to main content

Node Operations

This document describes every resource, operation, and parameter available in the Site Selected SharePoint node.

Common Parameters​

These parameters are always visible regardless of the selected resource or operation:

ParameterTypeRequiredDefaultDescription
ResourceselectYesItemThe SharePoint resource to operate on (Item, File, List, User)
Siteresource locatorNoCredential's Default SiteThe target SharePoint site (by URL, Host & Path, or ID)
Refresh Metadata CachebooleanNofalseBypass and repopulate cached site/list/column metadata for this execution, and for the column dropdowns (Site/List/"Add Column" pickers) — check this after adding, renaming, or removing a SharePoint column so the pickers pick up the change immediately instead of waiting for the cache to expire

Site Parameter Modes​

ModeInput formatExample
By URLFull SharePoint site URLhttps://bcgov.sharepoint.com/sites/ENV-STB-TEST
By Host & Pathhostname/pathbcgov.sharepoint.com/sites/ENV-STB-TEST
By IDGraph composite site IDbcgov.sharepoint.com,collection-guid,web-guid

If the Site field is left blank, the credential's Default Site URL is used.


Item Resource​

Operate on SharePoint list items. Requires a List selection (from dropdown, by name, or by ID).

Item: Create​

Create a new list item with field values mapped by display name or internal name.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list (From List dropdown, By Name, or By ID)
Field Input ModeselectYesfieldsHow to provide field values: Pick Fields or Use JSON
Fieldsfixed collectionYes*—Column/value pairs (Pick Fields mode)
Fields (JSON)jsonYes*{}JSON object keyed by display or internal name (Use JSON mode)

* Required based on Field Input Mode selection.

Field resolution: Display names are automatically resolved to internal column names using the list's column schema. Person/Group fields accept an email address — the node resolves the SharePoint LookupId internally.

Output: The created item as returned by Graph (includes id, fields, createdDateTime, etc.).


Item: Create or Update (Upsert)​

Create a new item or update an existing one based on match criteria.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list
Field Input ModeselectYesfieldsPick Fields or Use JSON
Fields / Fields JSONvariesYes—The field values to write
Match Fields (JSON)jsonYes{}Object of field:value pairs AND-composed into the match filter

Behaviour:

  1. The node queries the list using the match fields as a filter
  2. If exactly one item matches, it's updated with the provided fields
  3. If no item matches, a new item is created
  4. If multiple items match, the node throws an error (ambiguous match)

Item: Delete​

Delete a list item by its ID.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list
Item IDstringYes—The list item's ID

Output: { "deleted": true, "id": "<itemId>" }


Item: Get​

Fetch a single list item by ID.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list
Item IDstringYes—The list item's ID
SimplifybooleanNotrueFlatten fields and re-key internal names to display names

Output (Simplify = true):

{
"id": "42",
"Title": "Record-123",
"COORS #": "CO-2024-001",
"Assigned To": "jane.doe@gov.bc.ca",
"createdDateTime": "2024-06-15T10:30:00Z"
}

Output (Simplify = false): Raw Graph response with nested fields object using internal column names.


Item: Get Many​

Fetch multiple list items with optional filtering and pagination.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list
Filter TypeselectNoNoneNone, Simple (UI builder), or OData (raw filter expression)
Conditionsfixed collectionYes*—Column/operator/value conditions (Simple mode)
OData FilterstringYes*—Raw OData $filter expression (OData mode)
Return AllbooleanNofalseFetch all pages (ignores Limit)
LimitnumberNo50Maximum items to return (when Return All = false)
SimplifybooleanNotrueFlatten fields and re-key internal names to display names

* Required based on Filter Type selection.

Simple Filter Operators​

OperatorOData equivalentExample
EqualseqStatus eq 'Active'
Not EqualsneStatus ne 'Closed'
Greater ThangtPriority gt 3
Greater Or EqualgeCreated ge '2024-01-01'
Less ThanltPriority lt 5
Less Or EqualleModified le '2024-12-31'
Starts Withstartswith()startswith(Title, 'CO-')
Containscontains()contains(Title, 'report')

Simple conditions are AND-composed. For OR logic or complex expressions, use OData mode.

OData Filter (raw $filter)​

When Filter Type = OData, the OData Filter string is passed through verbatim as the Microsoft Graph $filter query parameter against the list-items endpoint:

GET /sites/{siteId}/lists/{listId}/items?$expand=fields&$filter=<your filter>

Unlike Simple mode, OData mode does not resolve display names to internal names and does not escape quotes for you. You must therefore:

  1. Reference columns by their internal name under the fields/ prefix (e.g. fields/Status). Use Item: Get Column Map to look up internal names — they often differ from the display name (a column shown as COORS # may be OData__x0043_oors__x0023_).
  2. Wrap text literals in single quotes, and escape a literal single quote by doubling it (' → '').
  3. Write dates as ISO 8601 without quotes.

The node always sends the Prefer: HonorNonIndexedQueriesWarningMayFailRandomly header, so filtering on non-indexed columns works.

Examples:

GoalOData Filter
Text equalsfields/Status eq 'Approved'
Contains / starts withcontains(fields/Title, 'Referral')
Number comparisonfields/Age ge 18
Booleanfields/IsActive eq true
Date (ISO 8601, no quotes)fields/Created ge 2026-01-01T00:00:00Z
Combine with and / orfields/Status eq 'Open' and fields/Region eq 'North'
Escape a literal apostrophefields/LastName eq 'O''Brien'
Person/Lookup column (by ID)fields/AssignedToLookupId eq 5

Tip: If a filter unexpectedly returns nothing, the usual cause is a display-name-vs-internal-name mismatch. Switch to Simple mode (which resolves display names automatically) or confirm the internal name via Get Column Map.


Item: Get Column Map​

Retrieve the display-name → internal-name mapping for all columns in a list.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list

Output:

{
"columnMap": {
"Title": "Title",
"COORS #": "OData__x0043_oors__x0023_",
"Assigned To": "Assigned_x0020_To",
"Date Received": "Date_x0020_Received"
}
}

Use this to understand available columns and their internal names when building OData filters or debugging field mapping.


Item: Update​

Update an existing list item's fields by item ID.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list
Item IDstringYes—The list item's ID
Field Input ModeselectYesfieldsPick Fields or Use JSON
Fields / JSONvariesYes—The field values to update

Only the specified fields are updated; other fields remain unchanged (PATCH semantics).


File Resource​

Operate on files in a SharePoint document library.

File: Download​

Download a file's content as binary data.

ParameterTypeRequiredDefaultDescription
Document Libraryresource locatorNoDefaultTarget library (Default, From List, By Name, or By ID)
Item IDstringYes—The Graph drive-item ID of the file
Output Data Field NamestringNodataBinary property name for the downloaded content

Output: Binary item with the file content, plus JSON metadata (fileName, mimeType).


File: Upload​

Upload a file to a document library. Files ≤ 4 MB use a simple PUT; larger files use Graph's resumable upload session.

ParameterTypeRequiredDefaultDescription
Document Libraryresource locatorNoDefaultTarget library
Input Data Field NamestringYesdataBinary property name holding the file content
Folder PathstringNo(root)Server-relative path within the library, e.g. Reports/2026
File NamestringYes—Destination file name
Conflict BehaviourselectNoFailFail, Replace, or Rename when a file with the same name exists
Create Parent FoldersbooleanNotrueAutomatically create intermediate folders if they don't exist
Chunk Size (MiB)numberNo5Chunk size for large uploads (must be a multiple of 0.3125 MiB)

Output: The Graph driveItem metadata of the uploaded file (includes id, name, size, webUrl).


File: Update​

Update a file's content, metadata, or both.

ParameterTypeRequiredDefaultDescription
Document Libraryresource locatorNoDefaultTarget library
Item IDstringYes—The Graph drive-item ID of the file
Update ModeselectYesUpdate MetadataReplace Contents, Update Metadata, or Both
Input Data Field NamestringYes*dataBinary property for new content (Replace Contents / Both)
Metadata (JSON)jsonYes*{}Graph driveItem fields to PATCH (Update Metadata / Both)

* Required based on Update Mode selection.

Example metadata JSON:

{
"name": "renamed-report.pdf",
"description": "Updated quarterly report"
}

Output: The updated Graph driveItem metadata.


List Resource​

Operate on SharePoint lists within a site.

List: Get​

Fetch metadata for a single list.

ParameterTypeRequiredDefaultDescription
Listresource locatorYes—Target list (From List dropdown, By Name, or By ID)
Include ColumnsbooleanNofalseAttach the display-name → internal-name column map

Output: List metadata from Graph (includes id, displayName, description, webUrl, itemCount). When Include Columns is true, a columnMap object is appended.


List: Get Many​

Enumerate lists on the site.

ParameterTypeRequiredDefaultDescription
Include Hidden ListsbooleanNofalseInclude system/hidden lists in results
Include ColumnsbooleanNofalseAttach column maps to each list
Return AllbooleanNofalseFetch all lists (ignores Limit)
LimitnumberNo50Maximum lists to return (when Return All = false)

Output: Array of list metadata objects.


User Resource​

Operate on SharePoint site users (the User Information List).

User: Get Lookup ID​

Resolve an email address to the integer SharePoint LookupId needed for Person/Group fields.

ParameterTypeRequiredDefaultDescription
EmailstringYes—The user's email address
On Not FoundselectNoErrorBehaviour when the user isn't in the User Information List

On Not Found Options​

OptionBehaviour
ErrorThrow an error (default)
Continue (Null)Return { email, lookupId: null } — useful for conditional branching
Ensure UserProvision the user on the site via SharePoint REST, then return the new LookupId

Ensure User requires Sites.Selected on both the Microsoft Graph and Office 365 SharePoint Online resources in your app registration.

Output:

{
"email": "jane.doe@gov.bc.ca",
"lookupId": 42
}

User: Get by Lookup ID​

The reverse of Get Lookup ID: resolve a person/lookup LookupId back to the principal's display name, email, and username via the hidden User Information List.

Use this when an Item: Get or Item: Get Many returns Person/Group columns as raw integers (e.g. RequestingOfficerLookupId: 17, SupervisorLookupId: 16). Microsoft Graph never resolves the display name inline on list items, so this operation performs the lookup explicitly.

ParameterTypeRequiredDefaultDescription
Lookup IDstringYes—A single LookupId (17) or a comma-separated list (17,16). Duplicate IDs are resolved once.
On Not FoundselectNoErrorBehaviour when a LookupId has no matching principal on the site.

On Not Found Options​

OptionBehaviour
ErrorThrow an error naming the missing LookupId (default)
Continue (Empty Fields)Return a row with empty email/displayName/userName for the missing ID, so the workflow proceeds

Behaviour:

  • Each unique LookupId is resolved with a single Graph call (GET .../User Information List/items/{lookupId}). Duplicates are de-duplicated, so 17,16 = 2 fetches and 17,17 = 1 fetch — no N+1 explosion.
  • Non-numeric or non-positive input is rejected with a clear error rather than producing a silent miss.

Output: One object per requested ID. requestedLookupId echoes the input so results can be joined back to their source rows.

[
{
"requestedLookupId": 17,
"lookupId": 17,
"email": "jane.doe@gov.bc.ca",
"displayName": "Jane Doe",
"userName": "jane.doe@gov.bc.ca"
}
]

Typical flow: chain Item: Get (or Get Many) into User: Get by Lookup ID with an expression such as ={{ $json.fields.RequestingOfficerLookupId }} to turn the LookupId into a name.

Limitation: Resolves Person/Group and lookup-to-user columns only, since it reads the User Information List. A lookup column pointing at a non-user list is not resolved by this operation. The person must also have accessed the site at least once to appear in the User Information List.


User: Get Many​

Enumerate users from the site's User Information List.

ParameterTypeRequiredDefaultDescription
Exclude System AccountsbooleanNotrueFilter out system and group principals, keeping only people
Return AllbooleanNofalseFetch all users (ignores Limit)
LimitnumberNo50Maximum users to return (when Return All = false)

Output: Array of user objects (includes id, loginName, title, email, principalType).


Field Input Modes​

When writing item fields (Create, Update, Create or Update), two input modes are available:

Pick Fields Mode​

Use the n8n UI to select columns from a dropdown and fill values one by one. The dropdown is populated from the list's column schema via the resource mapper. This mode is ideal for:

  • Simple forms with a few fields
  • Exploring available columns
  • Non-technical users

The Value input is a plain string field, not JSON — type or map a value directly (e.g. Angling). For multi-value columns (multi-choice, multi-person, multi-lookup), enter a comma-separated list (e.g. Angling,Hunting,Firearms); the node splits it and writes the correct multi-value payload. An array expression ({{ ["Angling","Hunting"] }}) also works if the upstream data is already an array.

Use JSON Mode​

Provide a JSON object keyed by display name or internal name:

{
"Title": "New Record",
"COORS #": "CO-2024-042",
"Assigned To": "jane.doe@gov.bc.ca",
"Date Received": "2024-06-15T00:00:00Z"
}

This mode is ideal for:

  • Dynamic field values from upstream nodes
  • Bulk operations with many columns
  • Experienced users who know the column names

Field Value Coercion​

The node automatically coerces values based on the column's SharePoint type:

Column typeInput formatCoercion
Person/GroupEmail stringResolved to LookupId integer
DateTimeISO 8601 stringPassed as-is (Graph handles parsing)
Number/CurrencyNumeric string or numberParsed to number
Boolean (Yes/No)true/false or 1/0Coerced to boolean
Choice (single-select)String valuePassed through as-is
Choice (multi-select, "checkboxes" choice)Comma-separated string (A,B,C) or an arraySplit into an array and written with the Collection(Edm.String) @odata.type annotation Graph requires for multi-value writes
Multi-value Person/LookupComma-separated string or an arraySplit into an array of resolved LookupIds, written as Collection(Edm.Int32)
Lookup (single-value)Integer or numeric stringPassed as LookupId

Multi-value detection for choice columns is based on Microsoft Graph's choice.displayAs facet ("checkBoxes" = multi-select); Graph does not expose a separate allowMultipleSelection flag for choice columns the way it does for Person/Group and Lookup columns.


Error Handling​

The node supports n8n's Continue On Fail mode. When enabled:

  • Failed items produce { "error": "error message" } in the output instead of stopping the workflow
  • Successfully processed items continue normally
  • Each output item maintains proper item linking (pairedItem) for data tracing

Common error scenarios:

ErrorCause
403 ForbiddenApp lacks Sites.Selected access to the target site
404 Not Found (site)Site URL is incorrect or site doesn't exist
404 Not Found (list)List name/ID doesn't match any list on the site
404 Not Found (item)Item ID doesn't exist in the list
429 Too Many RequestsGraph throttling — the node auto-retries with backoff
Multiple items matched for upsertMatch fields in Create or Update are too broad
Invalid JSON in FieldsThe Fields (JSON) parameter contains malformed JSON
User not found in User Information ListEmail doesn't exist on site; use Ensure User or Continue (Null)

Conditional Field Visibility​

n8n's displayOptions controls which fields are shown in the UI based on the current resource and operation selections. Key visibility rules:

FieldVisible when
List (item)Resource = Item
Document LibraryResource = File
Item IDItem: Get/Update/Delete, File: Download/Update
Field Input ModeItem: Create/Update/Create or Update
Filter TypeItem: Get Many
OData FilterItem: Get Many + Filter Type = OData
Simple ConditionsItem: Get Many + Filter Type = Simple
SimplifyItem: Get / Get Many
EmailUser: Get Lookup ID
On Not FoundUser: Get Lookup ID
Lookup IDUser: Get by Lookup ID
On Not FoundUser: Get by Lookup ID
Conflict BehaviourFile: Upload
Update ModeFile: Update
Include ColumnsList: Get / Get Many