Business Central 🧡 Power Automate – Setting up Automated Workflows (Preview)

Since Business Central 20.1 it’s finally possible to set up Automated Power Automate Workflows again. Business Central 🧡’s Power Automate even more. With automated workflows your end-users can now manually trigger Power Automate workflows within the Business Central context. This means that:

  • You’ll now get contextual information when triggering Power Automates from BC. This greatly improves the usability of Power Automate in combination with the Business Central ERP. The contextual info you’ll get includes:
    • The SystemId of the record that was selected before triggering the Flow.
    • A hyperlink to the record.
    • The user who triggered the workflow.
    • Etc.

In this blog I’ll show you what setup needs to be done to get this functionality working correctly. The Microsoft kb where I got this information from is: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/powerplatform/automate-workflows. Some weird quirks / bugs are still present in the functionality because it’s a Preview Feature.

Anyhow, I’m super excited about this functionality because it opens the doorway to even more Citizen Development in combination with Business Central. Having said that, let’s get started!

1. Running BC20.1

Our first step is making sure we’re running BC20.1. Go to the BC admin center and check your environment is runing 20.1. You can access the admin center through the following link: https://businesscentral.dynamics.com/<TenantID>/admin. Replace the TenantID with your own Tenant ID.

2. Enable Preview Features in Business Central

Open Business Central, navigate to the Page Feature Management and enable the feature “Run Power Automate flows without leaving Business Central (Preview)”. Enable this Preview feature for All Users, then sign out and sign in again in your Business Central environment.

3. Try out the Preview Feature

Next step is to Try out the Preview feature. Go to the Feature Management page again and click the “Try it out” link. A new browser tab will open and you can test out the feature.

You can only test this feature correctly by pressing the Try it out button. If you close your browser, session or clear your cookies this feature will not work again. You’ll need to press the Try it out button again to test the feature. You should be aware of this, it did cost me some valuable time during testing 😉.

4. Create a Power Automate Flow in the Item List

  1. Navigate to the item list. Use the Search function (Alt + Q), search for “Items” and select the item list.
  2. In the item list, go to Navigate -> Automate -> Power Automate -> Create a flow. Power Automate will directly open.

Power Automate will directly open.

3. In Power Automate, fill the following information:

  • Environment name.
  • Company name.
  • Page or table = TABLE27.
  • Add at least 1 input parameter, otherwise this functionality won’t work correctly. This is probably happening because it’s in Preview.

Also add a “Send an email” action to see the result of the Power Automate feature. You can also see that we’ll send the attachment that the user adds in Business Central by mail.

4. Now save your flow.

5. Go back to Business Central and test the Flow

In Business Central the Power Automate flow will now be available on all the Pages that make use of the Item Table (Table 27). Press the Flow and a input screen will pop-up because we’ve defined input parameters.

Fill the input parameters, then press “Run Flow”.

The Flow has run, now go back to Power Automate.

6. Check the result in Power Automate

In Power Automate, open your Flow by navigating to the “My Flows” list. Open the Flow, then ensure that the Flow has run correctly.

In my case, the result will be an e-mail with contextual information ánd a pdf-file!

I think two things stand out in this new functionality:

  • We have the ability to define a lot of input parameters and even add attachments. The base64-content of the attachment will be passed from Business Central to Power Automate, which is great.
  • The contextual information offers a lot of information; especially the WebClientUrl is extremely valuable because it redirects to the record that was selected in Business Central. So if your end-user clicks the hyperlink in the e-mail, the user will be redirected to the correct record directly!

7. Final thoughts

The new Power Automate features that Business Central offers is something I’ve been wanting for a long time. It’s finally possible to create Power Automates that are Business Central aware. Before this was not possible. You could run Flows from BC, but when the Flow was triggered we did not know on which record it was triggered. Another thing to point out is that you can run these new BC-Flows from ANY page or table. As long as you can access the page through the BC user interface, you can run a Flow from it. This opens up a whole lot of new integration scenario’s.

Perhaps I want to directly send a Teams-message to the logistical warehouse manager once I’ve released a big batch of sales orders? No problem, use a Power Automate Flow. Want to create different types of mail notifications directly from Business Central? No problem, use Power Automate! The possibilities are almost endless, so I hope I gave you some inspiration to try out and explore this new feature.

Thanks for reading!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.