Microsoft Flow is a fundamental part of the power platform. It is a tool that manages the flow of data across or between cloud environments. Microsoft supplies connectors that connects us with 250+ cloud environments such as Common Data Service, SharePoint, Twitter and Twilio. (If you want to see the full list of connectors, you can find it here.)

Working with the power platform in its early days is very exciting! In short, it’s the new application platform that will host first party business applications from Microsoft as well as independent third-party applications.

In this blog I will walk through all the steps of creating a flow that will be triggered on-demand from within a model-driven app such as Dynamics 365 for Sales. The flow will send an email to a contact from a shared mailbox.

Enable Microsoft Flow in your Environment

If you haven’t enabled flow in your environment you can follow these steps to do so.

Settings->Administration->System Settings->Customization->Enable Microsoft Flow

Now you will see Flow as a button in the ribbon. The button in the ribbon will appear in the same occasions as you are used to the run workflow button appearing.

Create a Flow

Now I will create a flow that will execute on-demand from within my model-driven application. Remember, workflows and on-demand flows are configured to run on a specific entity.

Flow->Create a flow

This flow will execute on-demand by a user that has selected one or many accounts. If multiple accounts are selected there will be multiple flow runs, one for each account. However, it’s possible to operate on multiple accounts in a single flow run, please contatct me about this if you would like to know more.

For the next step we will be sending an email using the Outlook connection. Search for Outlook

Select Office 365 Outlook, since we are going to be sending this email from a shared mailbox. We will be presented with many different actions. Search for shared.
(Please note that this action is in preview and is not intended to be used in a production environment)

Specify the email in Microsoft Flow

We are asked to specify the from and to email-addresses as well as the content of the email. The shared mailbox I will use will be info@crmkonsulterna.se in this case. The recipient on the other hand is not static. To accomplish this, we will use a feature in Flow called dynamic content and access the email field on the account record. Put your cursor in the to field, this will open the dynamic content tool. Search for email.

Read the short description under each of the different options and select the correct field. On the very bottom we can see User email. That dynamic content contains the email address of the user that triggered the on-demand flow. Now, put a subject and body in the email. We can include more dynamic content in the subject and body or add more recipients if we want to.

Finally, lets enter a suitable name for our flow and save!

The flow will appear back in the model-driven application in the context of the account entity.

How to create a Flow

Summary

Microsoft Flow is the future, we have mentioned it in a previous post called “Flow i Medvind” (article in swedish) and with the amount of different connectors you can accomplish really advanced things with your Dynamics 365. All without having to write a single line of code!
If you would like to know more about Microsoft Flow and how it can help your organisation. Please do not hesitate to contact us in the contact form.