Delete a SharePoint document

Last published at: April 26th, 2021

Description:

Delete 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 spDeleteDocument example.          

  • Create a new definition called “spDeleteDocument”
  • Select the definition and click the “design” button
  • Let’s define variables called “spdeletedoc”, click on the “start” step and select the “define variables” button
  • Enter “spdeletedoc” for the name of the variable, select “String” as the data type and click the “add” button.
  • Drag a spDeleteDocument step to the canvas
  • Connect the dots between the start and spDeleteDocument step

  • Click on the “spdeletedocument” step to configure its properties
  • Configure the following values for the properties as shown on the below graphic
  • Select oAuth provider dropdown values coming from connection menu oAuth setting need to be configure Sharepoint oAuth params and get authorization. 
  • Save the workflow definition
  • Create a workflow instance and execute
  • Workflow will start and deletes document from SP.