Actions14
Overview
The Folder → Search operation in the Microsoft SharePoint n8n node allows you to search for folders within a specified SharePoint site using a query string. This is useful for automating workflows that need to locate folders based on their name, metadata, or content. For example, you might use this node to find all project folders containing a specific keyword, or to dynamically retrieve folder IDs for further processing in your automation.
Practical scenarios:
- Automatically locating client folders by name or tag.
- Searching for folders created or modified by a certain user.
- Filtering folders for reporting or batch operations.
Properties
Name | Meaning |
---|---|
Site ID | The identifier or name of the SharePoint site where the search will be performed. Options may include preconfigured site IDs such as "Financial". |
Query | The text string used to search for folders. The search matches across several fields including folder name, metadata, and possibly content. |
Output
The output is an array of JSON objects, each representing a folder that matches the search criteria. Each object contains details about the folder as returned by the SharePoint API. Typical fields may include:
[
{
"id": "folder-id",
"name": "Folder Name",
"webUrl": "https://.../folder-url",
"createdDateTime": "2023-01-01T12:00:00Z",
"lastModifiedDateTime": "2023-01-02T15:30:00Z",
"folder": { ... },
// other metadata fields
}
]
- Only items identified as folders are included in the results.
Dependencies
- External Service: Requires access to Microsoft SharePoint Online.
- Authentication: Needs valid OAuth2 credentials configured in n8n (
microsoftSharepointOAuth2Api
). - n8n Configuration: The node must be set up with appropriate permissions to read from the target SharePoint site.
Troubleshooting
Common Issues:
- Invalid Site ID: If the provided Site ID does not exist or the credentials lack access, the node will fail.
- Empty Results: If the query does not match any folders, the output will be an empty array.
- Permission Errors: Insufficient permissions will result in authentication or authorization errors.
Error Messages:
"Resource not found"
: Check that the Site ID is correct and accessible."Access denied"
: Ensure the OAuth2 credentials have permission to read folders in the specified site."The ID you provided does not belong to a file."
: Not applicable for folder search, but indicates a resource type mismatch in other operations.