Microsoft Power Automate#

Have a look at our homepage to find potential use cases.

Create a new flow#

Create a new flow. In this tutorial we showcase an instant cloud flow.

img.png

img_1.png

1. Add a file trigger#

Add a file trigger to Power Automate

If it’s the first time you use the Konfuzio Document AI Connector you will need to login to Konfuzio:

2. Select to upload to Konfuzio#

Name the data file as you like, we call it “PowerAutomateFile”. Even the file name will be identical for each upload to Konfuzio the file ID will be unique.

Connect Konfuzio to Power Automate

The variable project refers to the ID of your project. Have a look under “Projects”. You will find the ID in your URL.

Detailed Information about sync and async HTTP Request:

sync In case of sync the workflow waits until the extraction process is finalized and a respond is sent back to Power Automate. The advantage hereby is that the detailed extraction information is retrieved automatically.
async In case of async the next workflow steps are run directly after sending the HTTP request to Konfuzio. It doesn't wait for any response and therefore in order to get the extraction details the request [GET Document Details](https://app.konfuzio.com/v2/swagger/#/docs/docs_retrieve) has to be called additionally. Depending on the workflow this kind of call can help to increase the performance.

img_9.png

3. Convert JSON to XML via MS Power Automate to use XPath#

If you need a valid XML output you can use the following procedure. Make sure to rename to name of the upload step, as we have seen inconsistent validation by the PowerAutomate platform in case whitespaces are used within the name.

Convert JSON to XML on PowerAutoamte

Copy the following expression:

Power Automate convert to utf-8 and JSON to XML#

xml(json(replace(concat('{ "?xml": { "@version": "1.0", "@encoding": "utf-8" }, "root": ', string(body('DocUpload')), ' }'),'\f','')))

This will allow you to use expressions like xpath(outputs('Compose'), 'string(//id/text())') to retrieve information form the document, i.e. the ID of the document via XPath.

img_10.png

img_11.png

Save and test your flow#

Save Power Automate Flow and run Document AI

If the screencast is to fast to view, we provide static screenshots below:

1. Connect to Konfuzio#

Make sure you see that you have a valid connection to app.konfuzio.com.

img_2.png

2. Select a file from your computer to test the processing#

img_3.png

3. You should then see a success message after running the pipeline#

img_5.png

In your Konfuzio Dashboard you should see the file which has just been uploaded and named “PowerAutomateFile”.

img_6.png

Additional Information#

Update Password on PowerAutomate#

Update the connection on PowerAutomate after changing your password on Konfuzio.

img_4.png