Delete Drafts On Document Library in SharePoint Online And Office 365 Using Nintex Workflows

Welcome to an article on how to use the action "Office 365 delete drafts" on document library in SharePoint Online and Office 365, using Nintex Workflows. This article will display the action “Office 365 delete drafts”. Here, we will see how to configure this action and use it for our work.

Using this action, you can delete any drafts or minor versions of the items in a document library.

Let’s see the implementation of this functionality.

  • I have created a document library “Dev Document”. In Dev Document, click the library tab on the top ribbon and click Nintex Workflows.

    library

  • You will see the screen to create a new Workflow.
  • Click below “Create new Workflow”.

    new
  • You will come to the design phase of Nintex Workflows.

    design

  • Add the action, “Office 365 delete drafts” action by right clicking on the Workflow or by dragging and dropping from the left toolbox.

    drafts
  • Now, let’s configure it.
  • When you double click on the action, the following screen opens up:

    screen
    screen
    screen

Configuration

  1. Destination site URL: Provide the site URL.
  2. List Name: Specify the name of the library.
  3. Drafts to Delete: You can choose if you want to delete all the drafts or if you delete based on your conditions.

    Delete

  4. SharePoint Online URL: Provide the site URL.
  5. Username: Provide the site user name.
  6. Password: Specify the password.
  7. All Matched Drafts Deleted: Here, you can add a variable to store the value ‘Yes’, if all the matched drafts are deleted.
  8. List item ID: Here, you can add a variable to store the list item Id.
  9. List item URL: Here, you can add a variable to store the list item URL.
  • Now, we have configured our workflow. Let’s go and publish it to use it.
  • Click Publish on the left corner of the ribbon of Nintex Designer.
    Publish
  • You will see the screen below.

    screen
  • Give your workflow a name
  • Description
  • Choose your task list where it should store the tasks; it will be Workflow Tasks by default.
  • Choose your history list, where it should store the history logs; it will be Workflow History by default.

  • Start Options

    1. You can start your Workflow manually.
    2. Or you can start your Workflow automatically, when an item is created. I will select this option to create automatically when an item is created.
    3. Or you can start your Workflow automatically when an item is modified.

  • Click Publish
  • Your workflow will get published.

Once you configure, the Workflow will automate the process of deleting the draft versions from the document library as per how your condition applies.

Hence, in this article, we saw how to delete the draft versions on the library, using the action Office 365 delete drafts in SharePoint Online and Office 365, using Nintex Workflows. We will see more new articles on the actions of Nintex Workflows.