All right, now, let's build an invoice processing or invoice extraction, none.
This is going to be a lot of fun and this is we're going to be building and training our own model in
this video.
And let me remind you, we are doing an automation course and we're going to learn how to use A.I. to
automate more of the things that we want to do.
So we can start with an invoice processing for and I can use it directly here in the floor.
I can see and try it out how it works.
So what is going to do?
It is going to automatically try to find different values inside the inside of the forms.
But this is not what my form looks like.
Let's say that I have different forms and I would like to train this model so that it recognizes forms
from my suppliers.
Maybe my suppliers have a specific type of form that looks completely different from anybody else's
form.
So I want to start from scratch.
I want to create a new model.
But I'm not just going to create a new model, I'm going to build on top of Microsoft model.
So what I need is five invoices from my supplier or five invoices that I want to analyze and extract
information from.
So let's get started and let's name this air model.
So we're going to be building a new A.I. model, and I'm going to call this model invoices
invoice a model.
So let's create this model.
This will take a couple of minutes to create the model.
So what we are doing right now, we are asking myself of our ultimate to create a custom model that
we can train with.
Information minus the power automate is going to take care of everything from training to hosting to
deploying and accessing, giving us access to our model.
So let's stop.
So the first thing that we need to do is we need to add a couple of fields.
So we need to add what kind of fields we want to extract from our from our invoice.
Let me show you the invoice that we are going to be using.
This is one of the invoices that we are going to be using, so we want to extract probably the date
we want to extract the invoice number.
We want to extract the address and some of these amounts may be total.
And that's and the customer ID.
All right.
So let's insert this information right here.
So we need a field.
So let's add the field.
So we want invoice number.
Let's add a few.
All right, let's add another.
So what do we want?
We want a address.
So.
Or how about location?
Let's have a customer I.D..
We can also extract a table, so let's try to extract a table as well from an invoice so that we can
have a summary.
So let's select this table.
Let's take a look at the invoice one more time and see what it looks like.
So we have a description and a price.
So let's extract those two fields, a description and a price.
So this is going to be a description.
And right here we are going to have the price.
All right, now, we have everything we can move on to training our model or giving it some examples,
so let's create a new collection and let's add some invoices to our collection so that we can show the
power automate can start learning how to train.
So let's add some documents, and the minimum amount of documents that we need is five documents.
So let me go to my folder and I will select training documents.
I have this five training documents that I will upload inside of our ultimate.
So let's go back to our flow.
And let's upload these documents, so let's find where we are saving them right here.
All right, we have uploaded these documents.
These documents are going to be used by Max of Power Automate to train and to learn where the data is
located so that when we receive a different invoice from this is supplier one.
A different invoice that looks completely different than these.
Well, not completely different, but it has different structure, more lines, different locations
of different things.
It is still going to be able to recognize, recognize the text.
Let's add another supplier, so let's add one more supplier.
So in this case, we are adding supplier to.
Let's supply a tool with these five invoices.
So again, we are adding five documents, which is the minimum amount of documents for Power Ultimate
to learn whether different elements are on the web page.
So let's close this.
Let's rename this into supplier to.
And let's proceed.
Let's go on to the next step.
Now we have to train our documents, so let's click on supplier one.
And now let's flag the different elements on the page where they are so power automate can identify
them automatically.
So let's select the invoice number.
Alright, so invoice number is right here and we're going to select this, or we're going to call it
like this, and we're going to select the invoice number next, the location.
So we're going to get all of this.
How about this is the location, so this is going to be the location and then the date is going to be
this is going to be the date, the total, we have it right here.
So this is going to be the total.
And this table that we have right here.
So let's select these two.
This is going to be our summary table that is perfect.
So right here, this is going to be the description and this is going to be the price, this is going
to be the description.
And this is going to be the price.
Excellent.
Let's click on save and like this, we have saved the table as well.
All right.
Now, let's repeat the same process for the next document.
So we have to do the same thing for the next document, so we have to take this and tell it that it's
great that this is a location.
This is a invoice number and this right here is the total.
This is the table, the summary table.
So let's add a description.
And let's add one more description.
So it is pretty fast to do this, and I just have to do it on five documents after I've done it on five
documents.
I can already utilize it inside of my floors and it can be considered that it has been trained already.
So this is the date.
He was laid there, and now I have completed with all of the fields, now that I have done this, I
can go back.
And I can repeat the same thing with supplier two.
So let's.
Several months later.
So let's select the last piece of information, which is the invoice number, and now we are done,
we can go on to the next step.
The next step is going to be to train our model and then we will be able to use it.
So this will take a couple of minutes.
So let's take a couple of minutes and wait for our model to train.
All right.
The model has finished training now.
We can use it inside of our floors or inside of our apps.
All right.
This is the model that has been created for us and has been deployed.
Now the next thing that we should do is we should publish our model so we can publish it so that once
we publish it, we can use it inside of power, automate and we can use it inside of power apps.
So we will be able to create a new flow and utilize our model instantaneously inside of outflows.
Let's run a quick test and see if the train if we can use a test image and extract the information.
So let's select this image, let's copy and paste it.
Now the image is running on top of our model, and it's extracting the information, so it has found
this information as the location, this as the date, this is the invoice number.
This as the summary.
And this as a we also see a confidence score of almost 99 percent, which is for sure, and we can also
check another another.
We can also make another test from the other supplier that we have.
So we have this other supplier right here so we can test them as well.
So let's test that invoice.
This invoice is a handwritten scanned invoice or should be more complicated to extract information.
And let's see if this is going to function and extract all the information.
So it found this ninth one percent sure it found this, 99 percent sure and the total in the end and
the table as well.
So that is how easy it is to create a custom flow that we can utilize immediately inside of our process.