Deletes the contents from a SharePoint 365 document library or folder using the Microsoft graph API.
The SharePoint 365 nodes integrate with SharePoint Online.
The node uses the OAuth 2.0 client credentials flow to access the REST API, using the mandatory ClientId, TenantId and ClientSecret credential fields. Before working with this node, ensure that your SharePoint administrator has granted the required permissions for you to access the SharePoint files and folders.
Using the properties FileName and FileNameMatchingCriteria allows you to filter files and folders depending on the value entered. The file or folder that is being searched for must start with the value being entered.
Specify the SharePoint URL hosting the SharePoint site in the SharePointUrl property. To authenticate, obtain the following SharePoint information from your SharePoint administrator and use it to configure the corresponding node properties:
SharePoint information | Node property |
---|---|
Application (client) ID | ClientId |
Directory (tenant) ID | TenantId |
Client secret (can also be referred to as the application password) | ClientSecret |
The output field _ServerRelativeUrl is marked for deprecation, and will be removed in a future LTS release.
All the SharePoint 365 nodes (List, Download, Upload and Delete) output the following fields, which can then be used as "from field" property sources in downstream connected SharePoint 365 nodes: _FileName, _SitePath, _DocumentLibrary, and _Folder.
Properties
SharePointUrl
Specify the SharePoint URL hosting the SharePoint site (e.g. https://sharepoint-server.example.com). The URL must be correctly formatted, or the node will fail.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
A value is required for this property.
SitePath
Optionally specify the SharePoint site name. Leave this property blank to connect to the default or root site (e.g. CommunicationSite).
It can be a relative URL for a subsite (e.g. CommunicationSite/SampleSubSite).
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
DocumentLibrary
Optionally specify the document library name under the specified SharePoint site (e.g. MySharedDocuments).
Leave this property blank to use the root document library of the specified site.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
FolderPath
Optionally specify the folder path to scan relative to the specified document library. Do not include the site name and document library in this path.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
FileName
Optionally specify the case insensitive name of the file to select from the SharePoint server. The value entered will be matched via the criteria chosen in the FileNameMatchingCriteria property, where you can choose from 'Equals' or 'StartsWith'.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
FileNameMatchingCriteria
Optionally choose from the following matching options that will be used with the FileName property when selecting files from the SharePoint server.
Choose from:
- Equals: List files that match exactly the value entered into the FileName property.
- StartsWith: List files that start with the value entered into the FileName property.
The default value is "Equals".
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
ClientId
Specify the client ID or application ID registered with Azure Active Directory.
A value is required for this property.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
TenantId
Specify the Tenant ID registered with Azure Active Directory.
A value is required for this property.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
ClientSecret
Specify the Client Secret for the registered client/application with Azure Active Directory.
A value is required for this property.
Choose the (from Field) variant of this property to look up the value from an input field with the name specified.
SiteRoot
Optionally specify the SharePoint root site location under which the site was created. The default root location for Team sites can be changed in the SharePoint admin center settings under Site creation.
Choose from:
- sites
- teams
The default value is sites.
PassThroughFields
Optionally specify which input fields will "pass through" the node unchanged from the input to the output, assuming that the input exists. The input fields specified will appear on those output records which were produced as a result of the input fields.
The following options are available:
- All - Passes through all the input data fields to the output.
- None - Passes none of the input data fields to the output; as such, only the fields created by the node appear on the output.
- Used - Passes through all the fields that the node used to create the output. Used fields include any input field referenced by a property, be it explicitly (i.e., via a 'field1' reference) or via a field pattern (i.e., '1:foo*').
- Unused - Passes through all the fields that the node did not use to create the output.
If a naming conflict exists between a pass-through field and an explicitly named output field, an error will occur.
The default value is Used.
ConnectionTimeout
Optionally specify the maximum period (in seconds) to wait before the connection times out.
By default, a connection timeout period does not apply.
StatusCodeOutputField
Optionally specify the name of the output field that will contain the deleted status code.
This status code is a numeric value that indicates the status code of the HTTP response.
The default value is _StatusCode.
StatusMessageOutputField
Optionally specify the name of the output field that will contain the error message that describes the status of the delete.
The default value is _StatusMessage.
FileNameOutputField
Optionally specify the output field that will contain the name of the deleted file.
The default value is "_FileName".
FileIdOutputField
Optionally specify the output field that will contain the id of the file or folder on the SharePoint server.
The default value is "_FileId".
SitePathOutputField
Optionally specify the output field that will contain the site path of the SharePoint server.
The default value is "_SitePath".
DocumentLibraryOutputField
Optionally specify the output field that will contain the document library of the site on the SharePoint server.
The default value is "_DocumentLibrary".
FolderPathOutputField
Optionally specify the output field that will contain the folder on the SharePoint server.
The default value is "_Folder".
ServerRelativeUrlOutputField
Optionally specify the output field that contains the location for Files/Folders that were deleted from the SharePoint server. e.g. /Documents/TestFolder/testFile.txt
The default value is "_ServerRelativeUrl".
ItemTypeOutputField
Optionally specify the output field that will contain the type item in the file list whether it is File or Folder.
The default value is "_FileType".
LengthOutputField
Optionally specify the output field that will contain the length of the file.
The default value is "_Length".
MimeTypeOutputField
Optionally specify the output field that will contain the mime type of the file.
The default value is "_MimeType".
TimeCreatedOutputField
Optionally specify the output field that will contain the time the uploaded file was created on the SharePoint server.
The default value is "_TimeCreated".
TimeLastModifiedOutputField
Optionally specify the output field that will contain the time the uploaded file was last modified on the SharePoint server.
The default value is "_TimeLastModified".
RetryCondition
Optionally specify under what conditions to retry a request.
Choose from:
- Never - Never retry a request.
- Http Status Error - Retry the request if the response status code is in the 4xx client error or 5xx server error categories.
- Network Error - Retry the request if a network error occurs. A network error is any low level network error that might occur. This could be a socket or connection timeout, TLS error and so on.
- Any Error - Retry the request if the response contains a http status error or a network error.
The default value is Never.
MaxRetries
Optionally specify the number of times to attempt an unsuccessful retry before error.
The default value is unlimited.
RetryTimeout
Optionally specify the maximum total amount of time to attempt to retry a failed request regardless of the number of attempts.
The default value is unlimited, the node will not timeout.
ProxyUrl
Optionally specify the URL of the proxy server to use for the HTTP requests. The URL should contain the protocol (http or https), the host, and the port. All other parts of the URL will be ignored.
The URL should be in a format similar to the following:
HTTP proxy: http://proxy.example.com:1234
HTTPS proxy: https://proxy.example.com:443
The node supports automatic detection of system proxy settings. To override system proxy settings see the IgnoreSystemProxy property.
ProxyUsername
Optionally specify the proxy username, where the proxy requires authentication.
This property should be left blank if ProxyUrl is not set.
ProxyPassword
Optionally specify the proxy password, where the proxy requires authentication.
This property should be left blank if ProxyUrl is not set.
ProxyAuthenticationMethod
Optionally specify the authentication method used to verify the user of the proxy server. Choose from:
- Basic
- Digest
- NTLM
If this property is not set, the system will try to automatically detect the best option. By default, this property is not set.
ProcessingErrorBehavior
Optionally specify the behavior of the node if an error occurs during the processing of an input record. Errors will always be output on the Errors output pin. Choose from:
- Error - Logs an error to the Errors panel and node fails.
- Log - Logs a warning to the Errors panel.
- Ignore - Ignores the error.
The default value is Error.
ErrorThreshold
Optionally specify the number of transfer errors that will cause the node to give up and fail.
Each record on the input pin is a "request". A transfer error is any error that causes a request to fail (e.g. a requested file does not exist). Setting this property instructs the node to continue processing requests as long as the number of errors remains below the given threshold.
An error threshold of 0 means never fail on a transfer error (the node will still fail on more serious errors).
The default value is 1 (i.e. the node fails on the first error that is encountered).
Inputs and outputs
Inputs: 1 optional (filenames).
Outputs: Deleted Items and Errors.