Skip to main content

SharePoint

Type ID: microsoftSharepoint  ·  Kind: Action  ·  Trace: TOOL

Work with Microsoft SharePoint through Microsoft Graph: enumerate sites and lists, and read/create/update/delete list items using dynamically loaded site, list, and column metadata.

Credentials

microsoftOAuth2

Resources & operations

  • Item (sharepointItem)
    • Get Many Items (getMany) - Return many items from a list.
    • Get One Item (getOne) - Return a single item by ID.
    • Create Item (create) - Create a list item from mapped fields.
    • Update Item (update) - Update an item's fields by ID.
    • Delete Item (delete) - Delete an item by ID.
  • List (sharepointList)
    • Get Many Lists (getMany) - Return many lists in a site.

Properties

Common

PropertyKeyTypeRequiredDefaultPossible valuesShown when
ResourceresourceoptionsYessharepointItemItem (sharepointItem), List (sharepointList)-

Item (sharepointItem)

PropertyKeyTypeRequiredDefaultPossible valuesShown when
OperationoperationoptionsYesgetManyGet Many Items (getMany), Get One Item (getOne), Create Item (create), Update Item (update), Delete Item (delete)resource = sharepointItem
SitesiteIdoptionsYes''Loaded dynamically at runtime (getSites, searchable)resource = sharepointItem
ListlistIdoptionsYes''Loaded dynamically at runtime (getLists, depends on siteId)resource = sharepointItem
LimitlimitnumberNo50Max number of items to returnresource = sharepointItem, operation = getMany
Return FieldsreturnFieldsstringNo''Comma-separated internal field names (optional)resource = sharepointItem, operation = getMany or getOne
Item IDitemIdstringYes''List item IDresource = sharepointItem, operation = getOne, update, or delete
Content TypecontentTypeIdoptionsYes{}Loaded dynamically at runtime (getMappingColumns, depends on siteId, listId)resource = sharepointItem, operation = create or update
FieldsfieldsresourceMapperYes{}Loaded dynamically at runtime (getListColumns, depends on siteId, listId, contentTypeId)resource = sharepointItem, operation = create or update

List (sharepointList) → Get Many Lists

PropertyKeyTypeRequiredDefaultPossible valuesShown when
OperationoperationoptionsYesgetManyGet Many Lists (getMany)resource = sharepointList
SitesiteIdoptionsYes''Loaded dynamically at runtime (getSites, searchable)resource = sharepointList

Notes

  • Requires a microsoftOAuth2 credential; the credential ID is read from credentials.id and resolved to a bearer token. A missing token raises Workflow error, credentials missing. The dynamic option loaders also require credentialId, otherwise they throw SharePoint requires OAuth2 credentials.
  • All requests target Microsoft Graph at https://graph.microsoft.com/v1.0<resource> with Authorization: Bearer <token>.
  • The node's execute switch only dispatches resource = sharepointItem (to item.execute); any other resource (including sharepointList) throws <node> has invalid value. The List resource's execute (getManyGET /sites/{siteId}/lists) is defined but is not reachable through the node's top-level switch.

Item operation behavior (item.execute):

  • Validates siteId, listId, and contentTypeId as non-empty for all operations (throws Missing siteId / Missing listId / Missing contentTypeId). Base path is /sites/{siteId}/lists/{listId}.
  • getMany - GET {base}/items?$expand=fields&$top={limit} (default 50). Maps results to { id, fields }. When returnFields is set, only those fields plus Title are kept. Output: { count, items }.
  • getOne - GET {base}/items/{itemId}?$expand=fields (requires itemId). Same returnFields filtering (plus Title). Output: { id, fields }.
  • create - POST {base}/items with body { fields } (from the resourceMapper). Output: { success: true, created }.
  • update - PATCH {base}/items/{itemId}/fields with the mapped fields (requires itemId). Output: { success: true, updated }.
  • delete - DELETE {base}/items/{itemId} (requires itemId). Output: { success: true, deletedId }.

Dynamic option loaders (methods.loadOptions):

  • getSites - GET /sites?search=<query|*>; returns { siteName, siteId } options.
  • getLists - GET /sites/{siteId}/lists; returns { listName, listId } options, filtered by search term.
  • getMappingColumns - GET /sites/{siteId}/lists/{listId}/contentTypes; returns a resourceMapper field set (skips hidden/readOnly columns).
  • getListColumns - GET /sites/{siteId}/lists/{listId}/contentTypes/{contentTypeId}/columns; returns resourceMapper fields. Column types map: choice→options, dateTime→dateTime, boolean→boolean, number/currency→number, text→string, else json.
  • On error the API handler throws Microsoft API request failed (<status>): <message>.