We’re going to walk through how to write a simple Flow using the Dataverse connector in Power Automate. Here are the business requirements:
Here’s how we can use Flow to solve for this problem!
1. Map out what you want to happen. In a prior blog article, I talked about how important it is to map out your flow, especially if you’re new or newer and still getting use to Flowing in Power Automate. Here’s our very simple diagram for this scenario:
2. Identify connectors we need (you can use Connector Review or Microsoft documentation to help). We will use: Dataverse & Teams.
If you need a refresher on how to build an automated flow, check out this blog article for help.
For our Flow, we want to use a trigger from the Dataverse connector (Note: the Dataverse connector replaced the legacy “Common Data Service” connector. It has the same actions and triggers, they only updated the name.)
In your Flow’s trigger, search for the Dataverse connector and you will see two triggers:
We will select the second option here for the rest of this example. If you haven’t already, you may be prompted to authenticate the Dataverse connector and provide log-in credentials. Once you do that, you will see this:
Once you select values for each of the above, you can press the + New step button to select the next step in your automation. In this example, our flow will run when an Opportunity is added or modified with a scope of Organization:
For this one, we’ve added a Condition to check that probability is greater than or equal to 75% and that status is Open:
We add a new step in the If yes box, selecting an action from Microsoft Teams: Post a message as the Flow bot to a channel. Select your Team, Channel and then create a message and headline using dynamic content:
For this use case, we don’t care about anything that isn’t above 75% probability, so we’ll lave the If no box blank.
That’s it! Our simple Flow is complete. Next up, save it, run the Flow checker and test it.
If you’re anything like me, you love using nested conditionals in the Classic Workflow interface of Dynamics 365. Let’s take another look at the If no branch to show you how to add another conditional here.
Let’s add in some more logic here and bring in additional connectors:
Here’s what that looks like using Power Automate:Note: we’re adding two new connectors here: Date & Time (in Built-In connectors) and Outlook Tasks.
For this, we needed to us the Date & Time built-in connector in each Branch of our nested conditional. In the If yes box, we used Get future time like this:
In the If no box, we used Get future time like this:
By placing these above the action to Create a task (V2), we are able to pull that dynamic content into our flow to use in future actions. (Our alternative is writing custom expressions, which seems much more difficult to me – but more developer-minded people will probably prefer it!)
Here’s the whole flow, with labels and including nested conditionals with Date & Time and the Outlook Task connectors:
The post Fun with Flow: How a Dynamics 365 System Administrator can Get Started Using the Dataverse Connector appeared first on .