When your to-do-list fills up and your day gets busy up to the point that the work you do gets out of your Flow – you need more Power.

Coffee will help in some cases, but what really does the trick is dox42 working with Microsoft Flow and PowerApps. The integration of dox42 into Microsoft Flow and PowerApps is an easy way to automate your workday creating customized and beautifully designed documents like reports, contacts, presentations and many more automatically.

What can you expect in this blog?

In this blog you will learn how to create a custom connector for a third party webservice (dox42) in MS Flow and trigger the dox42 document creation from a PowerApp.

  • Creating a dox42 REST URL using the dox42Server TestClient
  • dox42Server Custom Connector in MS Flow
  • MS PowerApp from a SharePoint list
  • Trigger an MS Flow from a PowerApp  
  • Generate documents by pressing a button using dox42 in combination with Microsoft PowerApps and Flow

For this blog the above-mentioned points will be demonstrated creating a PowerPoint presentation. This works the same way with all kinds of documents like Word and Excel. Common dox42 customer scenarios include the creation of Orders, Invoices, Contracts, Certificates and many more.

The Real World

We at dox42 generate our presentations for our events with Flow/PowerApps. The design is done with the dox42 Office Add-Ins. For more information visit the dox42 website.

Diese Diashow benötigt JavaScript.

This is one of the many cases where we can create individual and visually appealing presentations on the fly, that are always there to be generated from our phones without the need to open our notebooks. We can show you how to build your own app with dox42, MS Flow and PowerApps.

This will be shown in six steps:

  1. Start – SharePoint List
  2. dox42Server TestClient – REST URL
  3. dox42Server Custom Connector
  4. PowerApp
  5. Flow our PowerApp
  6. The final UI touch

1. Start – SharePoint List

Everything starts, like most things in the life of a SharePoint User with a list, containing all the Items we need to make the presentation unique for an event.

SharePoint list

2. dox42Server TestClient – REST URL

First, we need to upload our presentation template together with the DataMap onto our dox42 server or SharePoint to be accessible for the dox42 server. The generation of the document needs to be tested from our local machine via a REST call which can be done using our dox42 ServerTestClient:

Diese Diashow benötigt JavaScript.

Here we can specify all needed parameters so that the TestClient can create the REST URL to make the call to test the generation. This REST URL will now be needed to define the Custom Connector mentioned earlier.

3. dox42Server Custom Connector

Now we can make the Connector within MS Flow by going to “Custom Connectors” -> “Create custom connector” -> “Create from blank”.

Custom Connector General
Here we have to put in the mandatory Host address. The other fields are optional, such as the icon picture, icon background color, description and so on. For our demo scenario, step 2.Security and 4.Test are optional. We already tested if the generation was successful with the dox42Server Test Client.
Custom Connector Definition
The main settings for the connector are made in the “Definition” step. There we have to click on “New action” plus sign and then fill out the “General” section with Summary, Description and Operation ID.
Custom Connector REST-URL
The Request is an important part. There we click on “+ Import from Sample”, then on the right side we select: “Verb”-> GET “URL” -> copy and paste the REST URL from our TestClient that we made earlier “Headers” -> type “Accept application/json” Click on “Import“
Custom Connector last step
The “Definition” step should look like this -> The only thing left to do is to click on the right upper side on “Create connector”. The settings can allways be changed and don’t forget to click on “update connector”. MS Flow needs approx. 5-7 minutes to make and update the connection!

4. PowerApp

Now that we have made the Custom Connector, it is time to play with PowerApps. In our case, the presentations are saved to SharePoint after the dox42Server has returned the newly generated document. To make this more appealing and user-friendly we use MS PowerApps where we can design the custom UI.

PowerApps main page
In PowerApps go to “Apps” -> “+ Create an app” the easiest way to create your SharePoint site/list in the PowerApps UI is to “Start with your data”-> “SharePoint – Phone layout”.
Creating new PowerApp
There you can choose the SharePoint list that can be represented in the PowerApp.
PowerApp from SharePoint list
First save the App. Here we can create the trigger for the Flow, which we’ll use at the specific “event site” to generate our document.
PowerApps button integration
Now to generate an item from the list you have to enter one of the labels in the designer and add a button, that will be the trigger. “Insert”->”Button”
PowerApps button flow trigger
“Action”->”Flows” where we define the Flow that is been done by pressing the button. “+ Create a new flow”

5. Flow our PowerApp

Now we have to make our Flow that will read all items in the list, generate the presentation that we select and then save to SharePoint.

Flow step 1
PowerApps is the beginning of the Flow. Because we want to select the presentation that has to be generated, we need to go through all the items in the list, that’s why we choose “Get items” select the Site Address and List Name.
Flow step 2
As mentioned earlier we go through all the items in the list and want to generate only the one that we selected. That means that we click the three dots on the side and select “Add an apply to each” with the output form the “value” in our example this are the values from the SharePoint list from the previous step.
Flow step 3
In the “Apply to each” section, we now add a condition that checks if the selected “Ask in PowerApps” is equal to one of the Titles in the list. What this does in our example is that it matches the Titles in our SharePoint list and the selected Title from the PowerApp panel that we want to generate.
Flow final step
When that is the case, then it has to start the generation of the document. That is the time where the Custom Connector comes in play, where we put in the needed parameters like in the REST URL call, with one exception and that is the Input Parameter, that defines which presentation has to be generated. In our case the ID of the one that we selected. Generating the document is not enough, we also want to save the file to SharePoint. We could to it with Azure Active directory  and the dox42 SharePointAction, because this is a demo we want to keep it simple. Therefore, we need to do that with “Create file”. The “File content” has to be the “Body” from the generated file before. Click “Save flow” and we are done with our Flow. 

6. The final UI touch

UI final touch
Now that we have made the Flow, we can call it by first selecting the button and then in the Action section under “OnSelect” will appear: “PowerAppsbutton.Run()“ Where we only have to put in the value of the Title. In this case: “PowerAppsbutton.Run(DataCardValue1.Tex)”
Now we can generate the presentations by the press of a button.

You can add, modify and trigger all presentations from your smartphone within only a few touches on the screen. Customize the PowerApps look to your needs.

For example, we created a dox42 custom design:


Winning the game

Developing custom solutions has traditionally been too costly and time consuming for many of the teams and departments, especially for those with projects that integrate multiple data sources. To solve this problem there is dox42, which shines together with Flow/PowerApps and allows a combination of various data sources such SQL, XML/JSON, CRM and many more. The result? People in departments from Sales to Marketing, from Operations to Finance now have the power to select and adopt tools to improve their document creation better than ever, with dox42.

To take your document game on another level, visit dox42.com or contact us via info@dox42.com for a personal Demo or Web Meeting to help you!