There are some subtleties to be aware of when automatically starting a Nintex worklow on a SharePoint document library. When there are no required fields on the document library you may encounter some unexpected behaviour: i.e., the workflow starts before all the metadata for the document is filled in. 

I will use an Invoice Approval example to illustrate what I mean by the availability of metadata and required fields when a document is added to a document library. In the Invoice Approval example, when a user adds a document to the document library they will be prompted to specify an invoice approver. After they have specified the invoice approver a workflow will start and an email will be sent to the invoice approver.

When creating a document library, by default there are no required fields, I have added a non-required column Invoice Approver that will allow the user uploading the document to specify who the Invoice Approver should be:

I have created a new Nintex worfklow on the document library that will send an email to the person identified in the Invoice Approver field. The workflow will automatically start when a new document is added to the library:

When I add a document to the library with no required fields the document is loaded into the library and the workflow automatically starts before I have finished entering in the metadata fields for the file (i.e., Invoice Approver). This is a problem as the Invoice Approver is blank.


Solution 1: Make a field on the document library a required field.

If you change the Title column on the document library to be a required field, SharePoint will wait until this field has been filled in and saved before automatically starting the Nintex Workflow.

Solution 2: The easiest solution would be to add the Nintex Wait for item update action.

This can be configured to wait until the Invoice Approver has been selected.

Solution 3: For a document library with no required fields, when adding a file and specifying metadata, two save events are performed. The first, when the document is uploaded (with blank metadata), and the second, when the metadata is filled in. In this case we can change the start conditions of the Nintex workflow to only start if a column's data we are expecting to be filled out changes. Note that a workflow will be started each time this metadata field changes.

In the Conditional Startup Options options you can do the following:

This essentially means that any time the invoice approver changes, a new workflow will be automatically started (if one is not already running).