Outlook Groups icon

Outlook Groups

Interact with Microsoft Outlook Groups and SharePoint

Overview

The "Get List Items" operation of the SharePoint resource in this node allows users to retrieve items from a specified SharePoint list within a selected SharePoint site. It supports fetching all items, limiting the number of returned items with paging, or filtering items based on specific field values.

This operation is beneficial when you want to automate workflows that require reading data stored in SharePoint lists, such as task tracking, inventory management, or any custom list-based data. For example, you could use it to fetch all active tasks from a project management list or retrieve a limited set of recent entries for reporting purposes.

Properties

Name Meaning
SharePoint Site The SharePoint site where the target list is located. This is required to identify the context for the list.
SharePoint List The specific SharePoint list from which to retrieve items.
Return Determines how items are returned:
- All Items: Returns all items from the list.
- Limit (Paging): Returns a limited number of items with paging support.
- Filter by Field(s): Returns items filtered by specified field values.
Limit When "Limit (Paging)" is selected, this sets the maximum number of items to return (between 1 and 1000).
Filter Fields When "Filter by Field(s)" is selected, this defines one or more filters to apply. Each filter includes:
- Field Name: The name of the field to filter by.
- Operation: The comparison operation (e.g., equals, contains).
- Value: The value to compare against.
Additional Options Optional parameters to customize the query:
- Select Fields: Comma-separated list of fields to return (e.g., "Title,Status,Created").
- Order By: Field and direction to order results (e.g., "Created desc").
- Expand Fields: Related fields to expand (e.g., "Author,Editor").

Output

The output is an array of JSON objects representing the SharePoint list items retrieved according to the specified parameters.

  • Each item corresponds to a single list entry.
  • The structure of each item matches the fields requested or expanded via the "Select Fields" and "Expand Fields" options.
  • If no specific fields are selected, the default set of fields is returned.
  • No binary data is output by this operation.

Example output snippet (simplified):

[
  {
    "json": {
      "id": "1",
      "fields": {
        "Title": "Task 1",
        "Status": "Active",
        "Created": "2024-01-01T12:00:00Z"
      }
    }
  },
  {
    "json": {
      "id": "2",
      "fields": {
        "Title": "Task 2",
        "Status": "Completed",
        "Created": "2024-01-02T08:30:00Z"
      }
    }
  }
]

Dependencies

  • Requires a valid connection to Microsoft Graph API with permissions to access SharePoint sites and lists.
  • An API authentication token or credential configured in n8n to authorize requests to Microsoft Graph.
  • The node uses internal helper functions to perform HTTP GET requests to Microsoft Graph endpoints for SharePoint.

Troubleshooting

  • Common Issues:

    • No SharePoint sites or lists found: Ensure the API credentials have sufficient permissions and that the SharePoint site and list exist.
    • Filter errors: Incorrect field names or unsupported operations in filters can cause errors. Verify field names exactly match those in SharePoint.
    • Empty results: Could be due to filters excluding all items or selecting a list with no items.
  • Error Messages:

    • "Unknown SharePoint operation": Indicates an invalid operation parameter; ensure "getListItems" is selected.
    • "Filter error: ...": Indicates a problem parsing or applying filters; check filter syntax and field names.
    • Network or permission errors from Microsoft Graph API will propagate; verify credentials and API access rights.

Links and References


This summary covers the static analysis of the "Get List Items" operation for the SharePoint resource in the provided node code and property definitions.

Discussion