Delete a SharePoint document

Use this step to delete a document on the Sharepoint site.

Last published at: July 31st, 2023

spDeleteDocument Step

Description:

This step deletes a document on the SharePoint site.

Inputs

  • BaseURL – BaseURL for ur Sharepoint site
  • selOAuthProvider - select OAuth Provider 
  • destinationFilePath – Path to save the file in SharePoint site
  • resultJson – store result in Variable or Global 
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

 

Example:

Let’s build and execute the “spDeleteDocumentDef” example.          

  • Create a new definition called “spDeleteDocumentDef”
  • Select the definition and click the “design” button
  • Drag a “spDeleteDocument” step to the canvas
  • Connect the dots between the start and “spDeleteDocument” step
  • Define a variable/global to store the result after execution
  • Click on the "spDeleteDocument" step to configure its "Settings" properties. Provide a name to the step. Provide the description. Provide the base URL for the SharePoint site. 
  • Click on the "spDeleteDocument" step to configure its "Settings" properties. Provide the path to delete the file in the specified location. Provide a variable/global to store the result after execution. 
  • Select oAuth provider dropdown values coming from connection menu oAuth setting need to be configure Sharepoint oAuth params and get authorization. 
  • Save the process definition, create a new process instance and execute. The workflow will start and deletes document from the SharePoint site.