Actions14
Overview
The Folder → Delete operation in the Microsoft SharePoint n8n node allows you to delete a specific folder from a SharePoint site. This is useful for automating the cleanup of outdated or unnecessary folders within your organization's SharePoint structure. For example, you might use this node in workflows that archive and then remove old project folders, or as part of a process to manage user-generated content.
Properties
Name | Meaning |
---|---|
Site ID | The identifier or name of the SharePoint site containing the folder you want to delete. |
Folder ID | The unique identifier of the folder to be deleted within the specified SharePoint site. |
Output
- The output is a JSON object with the following structure:
{ "success": true }
success
: Indicates whether the folder was successfully deleted (true
).
If an error occurs and "Continue On Fail" is enabled, the output will include an error message:
{
"error": "Error message here"
}
Dependencies
- External Service: Requires access to Microsoft SharePoint.
- Authentication: Needs valid credentials for the
microsoftSharepointOAuth2Api
(OAuth2). - n8n Configuration: Ensure the Microsoft SharePoint OAuth2 credential is set up in your n8n instance.
Troubleshooting
Common Issues:
- Invalid Site ID or Folder ID: If either ID is incorrect or does not exist, the node will fail with an error message indicating the resource could not be found.
- Insufficient Permissions: The connected account must have permission to delete folders in the specified SharePoint site.
- Folder In Use: Attempting to delete a folder that is locked or in use may result in an error from SharePoint.
Error Messages:
"Resource not found"
: Check that both the Site ID and Folder ID are correct."Access denied"
: Verify that your credentials have sufficient permissions."The ID you provided does not belong to a folder."
: Make sure the Folder ID refers to a folder, not a file or other item.