Implement Document Conversion Jobs In SharePoint Server 2016 Using Nintex Workflows

In this article, you will learn to implement document conversion jobs in SharePoint Server 2016, using Nintex Workflows.

Word Automation Service in SharePoint enables the conversion of the documents supported by Microsoft Word. This Service is provided as a Service Application in SharePoint. Conversion of the documents is not present as an On Demand Service. Instead, the conversion of the job is handled by a timer job called Word Automation Services. It is set to run after every 15 minutes. During its run, it picks up the conversion jobs and performs the conversion of the documents. Thus, in order to perform document conversions, ensure that Word Automation Services Application is created.

SharePoint

Also make sure that the service is started.

SharePoint

You can read more about Word Automation Services here. In this article, we will see how to implement Document conversion jobs in SharePoint, using Nintex Workflow 2016.

Getting Started

Create a document library, where the documents to be converted will be stored. Let’s create the library WordToPDF that will store Word documents to be converted to PDF.

SharePoint

Add Nintex Workflow to Library

Now, let’s add the Nintex Workflow by selecting “Create a Workflow in Nintex Workflow” option.

SharePoint

Drag and Drop Regular Expression action to the Workflow designer. Regular expression will be used to get the document's current name along with the extension. The extension will be then replaced with the converted document’s extension, so that it can be assigned to the converted document.

SharePoint

Select the Configure option from the drop down.

SharePoint

Let’s create a Workflow variable, which will hold the converted document's name, which will be used in the Workflow.

SharePoint

Select the New button.

SharePoint

Specify the variable name and the data type.

SharePoint

In the Pattern text box, specify the current document extension, doc|docx. In the Replacement text box, specify the destination document extension, PDF. This will help us to get the PDF document name, which will be assigned to the converted document.

SharePoint

In the input text, specify the Item URL.

SharePoint

SharePoint

Convert Document Action

Once we have assigned the variable with the destination document name that will be assigned to the converted document, add the action Convert Document.

SharePoint

Select Configure action from the drop down.

SharePoint

Specify the values for the parameters, mentioned below of the action.
Source
Set it as Current item

File type
Set is as Automatic

Output URL
Set it to the variable that was configured earlier.

SharePoint

The Workflow designer will now look, as shown below.

SharePoint

Now, we have to set the Workflow triggering condition. Select Workflow settings.

SharePoint

Currently, we will set it to start manually.

SharePoint

Now, let’s go ahead and publish the Workflow.

SharePoint

Finally, the Workflow has been published.

SharePoint

We can test out the Workflow by going to the Library.

SharePoint

Once the document has been uploaded, click Start to invoke the Workflow.

SharePoint

It will start the Workflow.

SharePoint

However, the Workflow is dependent on SharePoint Timer Job Word Automation Services Timer Job.

SharePoint

By default, it is set to run every 15 minutes so the document conversion jobs can take up to 15 minutes to complete. However, you can force run the timer job to kick start the conversion job.

SharePoint

Once it is run, the document will be converted to the destination format. Here, we had uploaded a .docx file. On running Nintex Workflow, it has converted it to a PDF document.

SharePoint

We can test the PDF document by opening it up in the Browser. It has been converted from the uploaded DOCX document successfully.

SharePoint

We had written the rule doc|docx in the regular expression action, so that both the file formats will be converted to PDF. Let’s test out that test case a well. Previously, we had uploaded DOCX. Let’s upload .DOC file as well and see the Workflow in action.

SharePoint

Start the Workflow manually.

SharePoint

The document conversion jobs have been completed and it has successfully converted DOC as well as DOCX to PDF documents.

SharePoint

Summary

Thus, we saw how to implement document conversion jobs in SharePoint Server 2016, using Nintex Workflow 2016.