How to create automated Microsoft flows in Dynamics 365 Business Central – Send an email notification when a customer approval is requested
Microsoft Flow: Automate processes and tasks
Hello everyone, my name is Christos Pittis and I am a Dynamics 365 consultant. In this episode, I am going to show you how you can use Dynamics 365 Business Central in an automated workflow. Microsoft Flow automate tasks by integrating your favorite apps, so you can make repetitive tasks easy with workflow automation.
In my scenario, I am going to add a trigger for Microsoft Dynamics 365 Business Central when a customer approval is requested.
In your browser, navigate to https://flow.microsoft.com/en-us/ and sign up for free. After signing in, choose My Flows from the ribbon at the top of the page. Click on the Create from Blank button and search for Dynamics 365 Business Central.
Type Dynamics 365 Business Central in Search for hundreds of connectors and triggers
Select the first line Microsoft Dynamics 365 Business Central – When a customer approval is requested
This flow triggers a flow when a customer approval request occurs in Microsoft Dynamics 365 Business Central.
Other available flows:
When a general journal batch approval is requested,
When a general journal line approval is requested,
When an item approval is requested,
When a purchase document approval is requested,
When a sales document approval is requested, or
When a vendor approval is requested.
Flow will prompt you to select a company within your Business Central tenant, as well as any conditions in your data that you want to listen for.
At this point, you have successfully connected to your Business Central data and are ready to begin building your flow.
Have in mind that, the Business Central Flow template integrates with the core workflow engine in Business Central. This means that each time you use one of these templates to create a flow, a corresponding workflow is created within Business Central.
Now is time to build the workflow. Choose the company you wish to use in your automated workflow and then the conditions. In this scenario I am using three conditions:
First condition = GenBusPostingGroup
First condition is = DOMESTIC
Second condition = GlobalDimension2Code
Second condition is = LARGE
Third condition = Blocked
Third condition is = “blank”
In simple words, when users create large domestic customers, the system trigger workflows.
Click Next step (Add your next step. Add steps one at a time until you create the flow you want)
You’ve three options now:
1. Add an action
2. Add a condition
3. More
Click Add an action
Select action Mail – Send an email notification (Send an email notification to the specified email addresses).
Click Accept
To: sales@memorli.co
Subject: New customer - please approve
Email body: Hi Sales Manager, a large domestic customer is onboard, KYC successful, please have a look and approve. Thanks!
Click Save
The connection has been established
Click Test
In the Test Flow select option, I’ll perform the trigger action
Click Save & Test
To see it work now, perform the starting action. This may take a few moments.
Switch back to Dynamics 365 Business Central and create a new customer
I am selecting a Customer template I created recently
Make sure you put the right values in the Customer Card, based on the conditions you have selected at the flow creation
I am going to go back to My Flows and locate my flow again
As you can see the Flow is on.
The system also created a workflow in Dynamics 365 Business Central and is enabled
Go back to the newly created Customer Card and click Send Approval Request
Check your email
Email received!
Check the Run History
Succeeded
Thanks for reading this blog post and watching my YouTube video. You can connect with me on LinkedIn https://uk.linkedin.com/in/christospittis or 365 talent portal https://www.365talentportal.com/
Christos Pittis
Dynamics NAV/Dynamics 365 Business Central consultant
*This post is locked for comments