Actions14
Overview
The File → Delete operation in the Microsoft SharePoint n8n node allows you to delete a specific file from a SharePoint site by providing the relevant Site ID and File ID. This is useful for automating file management tasks, such as cleaning up outdated documents or removing files as part of a workflow.
Common scenarios:
- Automatically deleting files after processing them.
- Removing sensitive or temporary files from SharePoint as part of a compliance workflow.
- Integrating with other systems to keep SharePoint storage organized.
Example:
After downloading and processing a report from SharePoint, you can use this operation to automatically delete the original file.
Properties
Name | Meaning |
---|---|
Site ID | The identifier or name of the SharePoint site where the file resides. |
File ID | The unique identifier of the file to be deleted within the specified SharePoint site. |
Output
Field | Description |
---|---|
success | Boolean value (true ) indicating that the file was successfully deleted. Example: |
{ "success": true }
|
Dependencies
- External Service: Requires access to Microsoft SharePoint.
- Authentication: Needs valid credentials for
microsoftSharepointOAuth2Api
(OAuth2). - n8n Configuration: Ensure the Microsoft SharePoint OAuth2 credential is set up in your n8n instance.
Troubleshooting
- Invalid Site ID or File ID:
If the provided Site ID or File ID is incorrect, the node may throw an error indicating that the resource could not be found. Double-check the IDs. - Insufficient Permissions:
If the authenticated user does not have permission to delete the file, an authorization error will occur. Ensure the connected account has the necessary permissions. - File Already Deleted:
Attempting to delete a file that no longer exists will result in an error from the SharePoint API.