Article last updated on the 28th of November 2023.
Contents
1. Introduction
2. Requirements
3.1. Creating a Power Automate flow
3.1.1. Custom WorkPoint Power Automate flow components
3.2. Power Automate flow configuration in WorkPoint 365
3.3. Testing the Power Automate flow integration
3.5. Creating a Power App
3.5.1. Using the WorkPoint connector with Power Apps.
5. Notes
5.1. Feature Support White List
5.1.1. Power Automate
5.1.2. Power Apps
1. Introduction
Microsoft Power Apps is a formula tool for can be used for creating formulas and small applications. Power Apps has a series of connectors which can be used to interface to a wide range of systems.
Microsoft Power Automate is a workflow product which replaces the standard SharePoint workflows. Microsoft Power Automate workflows are independent of SharePoint and have, like Power Apps, a series of connectors for a wide range of other systems.
A typical use case for the integration and use of Microsoft Power Apps and Microsoft Automate flows is in relation to approval processes for documents, e.g. when sending a document for approval by another person. Before this integration, this scenario would require a registered flow on all document libraries where this process is needed. A problem with this method is that in WorkPoint, one can easily have several thousands of document libraries, and thus, it is not advisable or technically possible to replicate the same flow onto every document library.
Integration with Power Apps and Power Automate makes it possible to have one central flow which can be called from each document. In addition, a Power Apps formula can be used to start a flow, thereby opening for users to fill in different parameters. This would allow the user to set up individual approval processes for individual documents or for a group of documents or templates.
2. Requirements
Please refer to the following table to see the license requirements for Microsoft Power Automate and Power Apps:
V3 - Standard | V3 - Business | V3 - Enterprise | WorkPoint 365 Core | V4 Package |
---|---|---|---|---|
Included | WorkPoint 365 Core |
This feature also requires that the solution is working in the Modern UI version of WorkPoint, as well as exclusively on WorkPoint 365. This feature is not accessible with WorkPoint On-Prem solutions.
3. Configuration
Before Microsoft Power Automate flows and/or Power Apps can be used in WorkPoint, a Power Automate flow or a Power App must first be created via Office 365. Examples on how to create both Power Automate flows and Power Apps are described in the following sections.
It should be noted that both Power Automate flows and Power Apps utilize parameters which, through the integration with WorkPoint, can be sent alongside e.g. documents and be used within the flow or app. While Power Automate flows handle parameters as separate items, Microsoft Power Apps handle parameters as URL parameters. This means that the URL of Power Apps may become so long that it exceeds the limit of how many characters a URL may be, which breaks the functionality of the Power App. Therefore, if sending a lot of parameters along with the document, it is preferable to use Microsoft Power Automate over Microsoft Power Apps.
3.1. Creating a Power Automate flow
In this example, we will create a Power Automate flow which sends an email containing a parameter from a document in the email body once the flow is triggered from within WorkPoint.
In order to set up a flow, follow these steps:
- On your WorkPoint solution, access the Office settings by clicking the dotted square icon in the top left of the solution.
- Click the “Power Autoamte” button from the Apps menu.
- From the Power Automate side menu, click the “My Flows” button.
- From the list of Flows, click the “New”-button and choose how to create a new flow. In the following example the “Instant – from blank” will be shown.
- In this example, the “Build an instant flow”-window is skipped as shown above. In case a custom name for the flow is preferred over the automatically generated one provided by Microsoft when this step is skipped, a name for the flow can be provided in the "Flow name"-field. In that case, "From Microsoft Flow" should be selected in the "Choose how to trigger this flow"-selection menu. Then click "Create".
- In the following window, use the search field to search for “http”.
- Select “when a HTTP request is received.
- After the “When a HTTP request is received” step is created, add an additional step by clicking the “New step”-button. This is the step that makes possible the integration with WorkPoint.
- In this example, the “Send me an email notification”-step is selected.
- A text for the Subject has been typed in.
- As an alternative to typing in the subject and body of the email to be sent, dynamic content can be inserted by clicking the parameter from the right-most panel.
Once these steps have been set up, click the “Save”-button.
- In the list of available Flows, which can be accessed from the “My Flows”-button in the left-most panel, the created Flow can be found. The name is auto-generated by the system, as we did not specify one before Step 5 in the “Flow name”-field.
- Action relating to the Flow can be accessed through the “More commands”-menu.
- IMPORTANT: When editing the created flow and selecting the “When a HTTP request is received”-step, a HTTP POST URL is displayed. This URL is a requirement when setting up a Power Automate flow in WorkPoint. It is therefore important to know how to acquire this URL. It is also important to note that this URL is only generated after the entire Flow including all steps have been saved.
3.1.1. Custom WorkPoint Power Automate flow components
WorkPoint has developed a set of custom flow steps for Power Autoamte. These can be used to perform action inside WorkPoint 365 through Power Automate flows. These steps are located in the "Custom" section when adding a new flow step:
- In the "All" tab, search for "workpoint". The WorkPoint connector can also be found by searching in the "Premium" tab.
- Click the WorkPoint connector.
This will present the user with a list of WorkPoint specific custom steps which can be used with a Power Automate flow:
- Click the information icon to get more information about each step:
3.2. Power Automate flow configuration in WorkPoint 365
In order to configure a Power Automate flow in WorkPoint 365, follow these steps:
- In the WorkPoint 365 Administration, click the header of the business module for which you wish to set up the Microsoft Flow and PowerApps integration.
- Click the “Microsoft Flow and PowerApps integration”-button from the drop-down menu.
- Click the “New Flow”-button to add a new flow to the configuration.
- Click the “New PowerApp” to add a new PowerApp to the configuration.
- Tick on or off the “enable” checker to enable or disable this flow.
- The flow can be given a title by filling in the “Title” field.
- One or more translations for the title can be provided by selecting a language from the drop-down menu, and filling in the text field. Add more translations by clicking the "+" button.
- The flow can also be given a flow description by filling in the “Description” field.
- One or more translations for the flow description can be provided by selecting a language from the drop-down menu, and filling in the text field. Add more translations by clicking the "+" button.
- Insert the Http Post URL for the flow you wish to run. This step presupposes that a flow has been set up, which generates a Http Post URL. Steps to locate the Http Post URL are outlined in section 3.1.
- The “List” field determines the list from where it should be possible to run this flow.
- Check the "Multiple documents selection support" if this flow should be executable while having multiple documents/files selected.
- In the “Parameters” field, add the fields you wish to include in the flow. These can be from both the entity or document. To add a parameter, click "Add Parameter". The following interface opens for adding a parameter:
For "Type", the following options are available:
- Document Field (used for parameters which pulls data from a field on a document)
- Entity Field(used for parameters which pulls data from a field on an entity)
The "Source Field" options depend on the Type selected. Source fields are fields in WorkPoint from which data can be pulled.
The Parameter Name can be set in the "Parameter Name" field.
Click the "Add Parameter" button once the parameter is configured to add it to the list of parameters.
- The “Permission” field determines which level of access to the document a user must have in order to be able to start the flow.
Once the configuration is finished, click the “Save”-button. Alternatively, cancel the configuration by clicking the “Cancel”-button.
Please note that the “Send to” button from which Flows and PowerApps are run will not appear before the WorkPoint 365 Browser Cache is cleared. This can be done by following these steps:
- On the WorkPoint solution, click the “Home”-button.
- In the bottom of the menu, click the “Need help?”-button.
- Click “Clear WorkPoint browser cache”.
3.3. Testing the Power Automate flow integration
After having configured both a Microsoft Flow and the integration with WorkPoint in sections 3.1 and 3.2, a test can be performed to see if the integration was successful. To do this, follow these steps:
- Click the header of the business module for which the integration has been set up.
- Click the “Microsoft Flow and PowerApp integration”-button.
- Click the “Edit”-button for the Flow you have created. The following edit window should open:
Now, in a separate internet browser tab, perform the following steps:
- In the Microsoft Flow page (www.flow.microsoft.com), navigate to the “My flows”-page.
- Click the “Edit”-button for the flow that was configured earlier. The following edit page should appear:
- In the editing page shown in the image, click the header of the “When a HTTP request is received.
- Make sure that the URL in the HTTP Post url field matches the link that was put inside the flow configuration in WorkPoint (7)
- See pt. 6.
- After validating that the two URLs match, click the “Test”-button in the top right of the Flow editing page.
- Check “I’ll perform the trigger action”.
- Click the “Test”-button.
The Flow edit page will turn blank with a turning-wheel spinning, awaiting some trigger. Now back in the edit page for the WorkPoint Flow configuration, follow these steps:
- Click the “Test”-button from the WorkPoint Flow configuration page.
- If there is no text inside the JSON Sample box, try clicking the “Reset”-button (13).
- Click the “Test”-button to perform the test.
The test should now run, and on a successful test, the following page should appear in the Microsoft Flow edit page:
Note the yellow bar in the top with the text saying “Your flow ran successfully”. If the configuration of the Microsoft Flow was performed as shown in section 3.1, you should also receive an email containing the body of the JSON Sample.
3.4. WorkPoint flow trigger
WorkPoint has developed an Action Management action called a "Notify WorkPoint365 Web Hooks". This action can be added to a WorkPoint Trigger. When this action is triggered in WorkPoint, it will also trigger the execution of a Microsoft Power Automate flow if the Power Automate flow trigger "Triggers when a WorkPoint event occurs" is used.
In practice, one would create an action of type "Notify WorkPoint365 Web Hooks" in WorkPoint 365 like so:
- In the Action Management page in the WorkPoint Administration, select the "Notify WorkPoint365 Web Hooks" action in the drop down menu.
- Click the "Add button".
- Provide a title for the action.
- Set the action to "Active".
- Click the "Save" button.
- Add the "Notify WorkPoint 365 Web Hooks" action to a trigger. In this case, we add the action to an already existing trigger, which also locks an entity.
- Click the "Update" (or "Save") button.
In a Power Automate flow, we can use the "Triggers when a WorkPoint event occurs" trigger, to execute based on the trigger in WorkPoint 365:
- In the Power Automate flow, we provide the "Triggers when a WorkPoint event occurs" trigger with the URL of the solution in question.
- We select the business module for which the trigger is set up.
- We select the trigger which contains the "Notify WorkPoint 365 Web Hooks" action.
- Optionally, we can add a description for the trigger.
- Now we can add more steps to the Power Automate flow to create functionality. This flow now triggers when the WorkPoint trigger is used to lock an entity on the "Projects" module.
3.5. Creating a Power App
In order to create a Power App, we need to navigate to the Microsoft Power Apps page:
- On your WorkPoint solution, click the "App Launcher" icon.
- In the list of Apps, click "Power Apps".
- If the "Power Apps" button is not present, click "All apps" and search for it, then click it.
- In the left side menu, click "Create" to create a new Power App.
- In this example, we will create an app from a blank slate. Click "Canvas app from blank".
- In the "Canvas app from blank" window, type in a name for the new Power App.
- Select a format for the Power App. Phone layout displays the app in a portrait format, while Tablet layout displays the app in landscape format.
- To finish setting up the Power App, click the "Create" button.
- In the welcome page, click the "Skip" button to start with a completely blank app.
The blank Power App should now be displaying:
- The "Tree view" displays all elements in the Power App. In this case we only have the "Screen1" element. The currently selected element has a gray background.
- The element selected in the "Tree view" is displayed in the middle of the screen. This is a preview of how to Power App looks.
- In the left-most panel, you can switch between the Tree view and several other panels. These are:
- Tree view (allows users to navigate the structure of the Power App, and inspect it's elements)
- Insert (allows users to insert elements into the Power App. Examples could be text fields, buttons, and galleries)
- Data sources (allows users to set up data sources for the Power App. Microsoft provides many default data sources, and WorkPoint also has one which is used for getting data from WorkPoint solutions.
- Media (allows users to upload different kinds of media to be used in the Power App)
- Advanced tools (contains a set of advanced tools for use when monitoring and testing Power Apps).
- In the right side panel, the properties- and advanced panels allows for tweaking of various properties of the currently selected element.
- In the top panel, we find the "File" menu, along with a set of other menus.
At this point, we can save the Power App, and start setting up the connection between the Power App, and the configuration in WorkPoint:
- Click the "File" menu in the top panel.
- Click "Save" in the side menu.
- Click the "Save" button.
- A message reading "All changes are saved" lets you know when the saving is complete.
Next, we need to access the details page for the app in order to note down the App ID which has been generated for it. We need this App ID for the configuration inside WorkPoint. Follow these steps to locate the App ID:
- In the Power Apps administration page, click "Apps" in the left side menu.
- Click the options for the Power App which was set up in the previous steps.
- In the menu, click "Details".
- In the Details page, the App ID is listed. This ID should either be noted down or copied to the clipboard.
We can now set up a Power App configuration in WorkPoint:
- In the WorkPoint Administration, click the options for the business module for which the Power App should be used.
- Click the "Microsoft Flow and PowerApp Integration" menu item.
- In the "Microsoft PowerApps" section, click "New PowerApp".
- Enable the Power App. In some cases, you would disable the Power App, e.g. if making changes to an existing Power App, or if you wish to enable the Power App only at a specific time.
- Provide a title for the Power App.
- Provide a description for the Power App.
- Insert the Power App ID which was found in pt. 21.
- Select the list on the business module entity from where the Power App should be able to be launched.
- Enable "Multiple document selection support" if the Power App should be able to be launched with multiple items selected in the list.
- The “Permission” field determines which level of access to the document a user must have in order to be able to start the PowerApp.
We can now start adding parameters, which are WorkPoint data, that we can then use in the Power App:
- Click "Add Parameter".
- Select the parameter type. If the parameter is a field on a document, select "Document Field". If the parameter is a field on the entity on which the document is located, select "Entity Field".
- Select the source field to fetch data from. These fields are dependent on the selection in pt. 34.
- Provide a name for the parameter.
- To add the configured parameter, click "Add Parameter".
The parameter has now been added to the Power App configuration:
- You can add more parameters by clicking "Add Parameter" again.
- To save the Power App configuration, click the "Save" button.
The Power App configuration should now appear in the Flow and Power Apps overview page:
- If you wish to edit the Power App configuration, click "Edit".
- If you wish to delete the Power App configuration, click "Delete".
We can now go back and edit the Power App and use the WorkPoint parameter we set up in the configuration:
- In the Microsoft Power Apps administration page, click "Apps" to go to the Apps overview.
- Select the App you wish to configure. In this example, that would be the one created in the previous steps in this guide.
- In the top panel, click "Edit".
- In the welcome window, click the "Skip" button.
We can now add a text field to display the WorkPoint parameter from the WorkPoint Power App configuration:
- In the top panel, click the "Insert" tab.
- Here, we can add various elements to the Power App. In this case, we want to display the document name of the WorkPoint item that this app is used with, so we click "Text".
- From the available options, we add a "Text input" field.
The Text input field has now been added to the Power App:
In this Text input field, we want to display the name of the document this Power App is used with. We can do that by editing the default Data field in the Advanced tab in the properties panel:
- In the Properties panel, click "Advanced".
- In the "DATA" section, change the "Default" field to read "Param("Document_DocName")". Note that the parameter set up in WorkPoint was provided with a type of "Document Field", and a name of "DocName". In this field, the prefix of "Document_" refers to the type of the parameter, and "DocName" is refers to the name of the parameter. If a parameter has a type of "Entity Field", and a name of e.g. "CompanyID", the value in the "Default" field here would need to be changed to "Param("Entity_CompanyID")".
We can now save the Power App and publish it:
- Click the "File" tab in the top panel.
- In the left side menu, click "Save".
- Optionally, add a version note for this version of the Power App.
- Click the "Save" button.
- Once the saving is complete, click the "Publish" button.
- Click the "Publish this version" button.
Back in WorkPoint, we can now start using the Power App. We do, however, need to clear the WorkPoint 365 Browser Cache first:
- In WorkPoint, click the "Home" button.
- In the side menu, click "Need help?".
- Click "Clear WorkPoint 365 browser cache".
The Power App is now ready for use. We can navigate to the documents library of an entity on the business module for which the Power App was set up:
- Select a document to use with the Power App.
- Click the "Send to..." button in the Command Bar.
- In the list of available options, click the Power App which was configured in the previous steps of this guide.
The Power App now opens, and displays the document name of the document selected in the library:
If you follow these steps, and the document name is not showing in the Text input field, make sure that:
- In the Power App design configuration, that the parameter is correctly prefixed with either "Document_" or "Entity_".
- That the field you wish to display the value from exists on the entity.
- That the field contains data.
3.5.1. Using the WorkPoint connector with Power Apps.
In this example, we will use the WorkPoint connector to pull data from WorkPoint and use it in a Power App. Specifically, we will use the connector to get the documents selected by the user in a WorkPoint library and display them in a Gallery in the Power App.
We start by creating a new Power App:
- In the Power Apps administration page, we go to the "Create" page.
- We click the "Canvas app from blank" option.
- In this example, we name the Power App "ViewDocuments".
- We select the "Phone" layout.
- We then click the "Create" button.
- In the welcome window, we click "Skip".
We now add a couple of elements to the blank app. More specifically, we will all a Label and a Gallery:
- We navigate to the "Insert" tab in the top panel.
- Under the "Text" elements, we click the "Label" button to add a text label to the Power App.
- With the text label selected, we can edit the "Text" field in the properties panel to read "Documents".
Next, we add the gallery:
- In the "Insert" tab, we click "Gallery".
- We then select "Vertical" from the list of options.
The gallery is now added to the Power App:
- You can resize the gallery by dragging the circular markers on the edges and middle of the gallery borders. In this example, we stretch the lower border to the bottom of the app. We also delete the chevron arrows for each element in the gallery by selecting them and hitting "Delete" on the keyboard. The app now looks like the following:
Next, we will add the WorkPoint connector, so we can use WorkPoint data in the app:
- In the top panel, we navigate to the "View" tab.
- Next, we click "Data sources".
- In the Data sources side panel, we perform a search for "workpoint".
- From the list of options, select the connector which corresponds to the environment of your WorkPoint solution. If your WorkPoint solution is a production environment, use the "WorkPoint" connector. If your WorkPoint solution is a test environment, use the "WorkPoint_test" connector.
In this example, we use the "WorkPoint_test" connector, but they work identically, so there should be no difference in use.
- In the pop-up section, click the connector again to add it. The connector should now show under the "In your app" section of the "Data sources" side panel:
We can now access various data and actions from the WorkPoint system in the Power App. In this example, we will have the items selected when the Power App is executed show as the gallery items in the gallery we have added to the Power App:
- We navigate to the Tree view side panel.
- We then select the gallery by clicking it.
- In the properties panel, we navigate to the "Advanced" tab.
- We now want to edit the value in the "Items" field. The current value of "CustomGallerySamble" makes the gallery fill with sample items. We want instead to fill the gallery with the documents selected by the user when executing the Power App. We can do that by inserting the following line into the "Items" value field:
WorkPoint.ParameterGetPowerAppAndFlowParameter(Param("WorkPointParameterId"), "htts://workpoint365test.sharepoint.com/sites/anm0007").Documents
Note that the URL string will need to be customized to point to your solution:
WorkPoint.ParameterGetPowerAppAndFlowParameter(Param("WorkPointParameterId"), "[YOUR WORKPOINT SOLUTION URL]").Documents
The Power App is going to display an error line and the sample items is going to disappear form the gallery. This is normal, as the Power App cannot at this point show the elements we ask for without being run from the WorkPoint solution. We can ignore the error for now.
The Power App should now look something like this:
We can now set up the WorkPoint Power App configuration:
- We enable the Power App.
- We provide a title of "View documents" to the Power App.
- A description is added to the Power App.
- We insert the App ID of the Power App. If you need help finding the App ID of your Power App, refer to pt. 19-22 in the "Creating a Power App" section.
- We select to be able to run the Power App from documents libraries.
- We enable support for multiple documents selection.
- We set the permission level to "Read".
We then clear the WorkPoint 365 browser cache to be able to use the Power App. If you need help clearing the WorkPoint 365 browser cache, please refer to pt. 57-59 in the "Creating a Power App" section.
The Power App can now be run from Document libraries on the business module on which the configuration was set up. In our example, we set it up on the Projects module on a Project Management solution:
- In the Document library on a project site, we select a range of elements we want to use with the Power App.
- To launch the Power App, we click "Send to..." in the Command Bar.
- In the list of available options, we select the Power App we set up the configuration for.
The Power App now launches and displays the documents we had selected in the gallery in the Power App we created:
The individual elements of the gallery, e.g. the picture for each item and the labels for the name and URL of the document can be edited in the Power App. We can e.g. insert another picture for the elements to better reflect that they are documents:
- In the Power App designer, navigate to the "Media" side panel in the left side menu.
- Click "Upload" to upload a new picture.
- Browse to the picture you wish to use and select it.
- Then click the "Open" button.
The document is now added to the Media section:
We can now select the image of the first item in the gallery in the App:
- With the image selected, navigate to the "Advanced" tab in the Properties panel.
- In the "Image" value field, the value of "SampleImage" makes the image show a sample image, as it does at the moment. Typing in the name of the media file we added to the Media section before makes the image change:
Note that the "Image" field value should be typed without the file extension of the image file you wish to show. We can now resize the image a bit, and change the area that one item takes up and make it a bit smaller. In addition, we have selected the "Subtitle1" element of the list item in the Tree view, and given it the "Text" value of ""Last modified: " & Param("Document_ModifiedDate")".
Using the Power App now produces the following output when used on files:
4. End User Guide
Click here to go to the end user guide article for Microsoft Power Automate and Power Apps.
5. Notes
An important difference between Microsoft Power Automate and Microsoft Power Apps is the way they handle parameters. Power Automate flows handle parameters as separate items, Microsoft Power Apps handles parameters as URL parameters. This means that the URL of Power Apps may become so long that it exceeds the limit of how many characters a URL may be, which breaks the functionality of the Power App. Therefore, if sending a lot of parameters along with the document, it is preferable to use Microsoft Power Automate flow over Microsoft Power Apps.
Please note that a parameter called “Document_ListRelativeUrl” is always sent to the Power Automate flow or Power App being run. This is a relative URL to the location of the file being copied. An example of this URL could be “/sites/myworkpoint/Company3/Documents”.
5.1. Feature Support White List
WorkPoint supports integration with various aspects of the Microsoft Power platform. There may, however, also be certain aspects of this platform which are not yet supported by WorkPoint.
The purpose of this white list is to provide information about which aspects of the Microsoft Power platform are supported by WorkPoint - "supported" meaning that these a tested and verified to work with WorkPoint.
5.1.1. Power Automate
The following aspects of Power Automate are supported by WorkPoint:
- Triggering a Power Automate flow from WorkPoint
- Using WorkPoint data in Power Automate flows
- Sending data to WorkPoint from a Power Automate flow
5.1.2. Power Apps
The following aspects of Power Apps are supported by WorkPoint:
- Using Microsoft Power Apps from WorkPoint
- Using WorkPoint data in Power Apps
- Sending WorkPoint document- and entity Data to Power Automate flows through Power Apps
If there are any aspects of the integration between WorkPoint and the Power platform which are not currently supported by WorkPoint but which you believe should be supported, please contact WorkPoint support at support@workpoint.dk, and relay your suggestion. Thank you!
Comments
0 comments
Please sign in to leave a comment.