I wanted to make a quick post today to highlight how I solved a use case with one of the new AI runtime actions in Nintex Workflow Cloud. This blog is going to focus on the Extract information from document or image action but be sure to check out the other new AI actions.

The use case I was presented by a client was that they wanted to be able to scan or take a picture of a driver’s license as they were entering the dump. This would be used to determine what to charge the driver based on whether they lived in the city or outside city limits where the cost would be different. I built this POC using a sample driver’s license from Arizona.

I created a Nintex Data Table to store the extracted data in, but it could be stored in another line of business system such as SQL, SharePoint, that’s one of the advantages of Nintex Workflow Cloud is the ability to easily connect to multiple line of business system out of the box.

Now that we have our table, we need to create a form that the driver’s license picture could be attached too. The form is simple just pulling in the logged in users’ name and allowing them to attach the image they took of the driver’s license.

Now let’s create our workflow, the 1st thing we need to do is grab the image that was attached to the form, to do that we will use a get item from collection action to grab the 1st and only item from the collection and store it in a file variable.

Once we have done that, we can send the image to the Extract information from document or image action. We just need to tell that action what data we want to return from document or image, what format we want it returned in and a variable to save it in.

Here is how the data is returned from the action when the sample driver’s license image is sent to it.

Now we just need to query the JSON for the individual items and save them to variables. Here is an example of one of the queries. Just do this for all the items you want to pull out of the JSON and save it to a variable.

I ran a parallel path action and configured JSON queries for each item that was pulled from image and saved them to variables.

Now that we have all the data assigned to variables, we can map those to the Nintex Data Table we created earlier in the blog so that when the workflow is run it will save the data extracted from the image to the Nintex Data Table.

Now we have the data we need to determine whether the driver lives within the city limits or not and what to invoice them.

This workflow could be easily adjusted to work with another state’s driver’s license, the data being extracted from the image would just need to be adjusted to match how it is displayed on that states driver’s license.