The Power Platform is a suite of applications that includes Power BI, Power Apps, Power Automate and more. A low-code programming language is used to work with data within the Power Platform and Microsoft is constantly updating and improving upon these applications. When it comes to the Power Platform, I wanted to focus on Power Automate and how it can be used to make working with data in Business Central even more convenient. Note that the below examples use a premium Power Automate license.
Last year I wrote two articles going over working with data in Business Central. The first article covered some basic data manipulation tasks and can be found here. The second article went further in depth covering Business Central’s configuration packages and can be found here. For this article I want to cover another method of working with data, the Power Platform.
Building Flows with Power Automate
Power Automate, formerly known as Microsoft Flow, is a tool that helps users automate tasks and business processes. It has many different connectors such as Outlook, Excel, SharePoint, Power BI, Business Central and more. Practically speaking, any program can be used in Power Automate to some degree, given you have access to an API.
Using Power Automate we can create what are called “flows.” Flows can be built in many ways including starting from scratch or basing a flow off a trigger, which are events that occur in an application.
Some of the convenient triggers available
Using these connectors and triggers we can map out a business process and automated it to a degree. Let’s say, for example that an email is received with an Excel attachment. Power Automate could enable the creation of a flow that saves that file to a specific folder in SharePoint and creates a journal entry in Business Central for you.
The capabilities are endless but because this article focuses on using Power Automate with Business Central we’ll first take a closer look at the Business Central connector and actions.
Business Central Connector
As you can see below, using the Business Central connector to build a Power Automate flow, there are plenty of triggers available.
In addition to the triggers, Business Central also provides actions such as “Get record”, “Create record” and many more to use in the creation of your flow:
Using a combination of the triggers and actions allows us to create a wide range of flows. In the example below, I’ve put together a simple flow that can help manage approvals:
I’ve used a simple template and you can see above that 1. is a Trigger and 2. is an Action
The approval workflow above also automatically creates a workflow in Business Central for me with the same conditions that are mapped out in the flow:
The flow is triggered upon the submission of a Purchase Order for approval which will then send a notification sent directly to Microsoft Teams account a well as my Outlook inbox:
Notification in Teams
I can then interact with the workflow in either Teams or Outlook directly:
Approve or reject an approval directly from Microsoft Teams
While Business Central does have its own workflow module, with Power Automate we can further improve upon the approval process and allow users to carry out workflow actions from either Microsoft Teams or Outlook. Using Power Automate also helps organize workflows in a nice convenient list.
Going beyond the actions available through the Business Central Connector, Power Automate also allows us to use HTTP actions, which can be much more powerful. HTTP actions work directly with web services, allowing users to work with most tables/pages in Business Central. This also means that any custom objects can be interacted.
Below is a Flow I’ve built that creates journal entries based on a template file:
So how does it work?
Once this flow is manually triggered it looks at the rows in a file and runs each row through the HTTP action. Once you select the HTTP action you then have the option select from a few methods such as GET, PUT, POST, PATCH etc.
To use the HTTP action, we also need a URL. In my previous article I touched on inspecting pages and extracting data. That same technique can be used here to get the Page and Table ID. If, for example, I wanted use Power Automate to help with creating payroll Journal Entries, I could inspect the Journal Entry page and use that to create a new web service on the “Web Services” page:
Once that’s setup I want to make sure to copy the OData V4 URL, as it is required for working with HTTP actions:
Now, my template file could include data from another system such as the test file below:
When I run my flow, it takes that file and creates journal entries for me in Business Central:
All you have to do after that is validate and post the journal entry.
HTTP actions work with more than just journal entries. In fact, they can work with most pages/tables in Business Central. Users can extract data, update records, and add new records on almost any table in the system.
With Power Automate we have a lot of options to help improve business processes and automate repetitive tasks such as preparing payroll journal entries, like above. It also connects to other programs and creates integrations that can ensure accuracy between many systems. The possibilities are endless. It’s really just a matter of having strong business processes and then ample testing.
If your business is interested in learning more about how Power Automate can improve their processes get in touch and schedule a demo with our consulting team today!