Last week in a meeting client explained requirement:
“.. we receive emails in a mail box, and we manually create contacts in CRM using sender name and address for further processing, we want to automate this.. .”
This task was going to extend existing system functionality but there was no existing code to reuse or modify and of course expectation was to deliver this soon. So it was a perfect case to use Microsoft Business Application Platform. In this post I will explain how easy it was to provide solution using Flow.
New to Flow ?
Flow is part of Business Application Platform and it is latest service from Microsoft to create automated workflow. It is intended for business and power users so most of the time tasks can be performed without writing a single line of code. Some of its cool features are:
- It integrates different systems and applications
- Create workflow and automation tasks
- Transfer data between systems
- Can be used easily with a bunch of other Microsoft technologies
To get started first step is to sign up at flow.microsoft.com. Currently there is a basic “Flow Free” plan which is free, for more details about pricing see this.
How Flow Works ?
There are three basic components in Flow which are connector, trigger and action.
Connector is used to connect to source and target system. A few examples of connectors are Dynamics 365, OneDrive, Gmail, Twitter, Excel, Azure Storage, Oracle, DB2, RSS, Eventbrite or Youtube. At the time almost 227 connectors are available and hopefully this number will increase.
A trigger is an event that occurs inside the connector. For example with SharePoint a few triggers are:
- File creation
- Deletion of a file
- File modification
Similarly a trigger with Gmail is when a new email arrives. A connector can have multiple triggers and in a flow usually we chose a trigger which start execution of flow.
After selecting trigger normally next step will be to chose target system or service (again using connector). Similar to triggers with source connector, a target connector may have multiple associated actions to chose from. For example Office 365 Outlook has:
- Create Contact
- Send Email
- Create Event
By choosing an action we tell what should happen to target system or server. Good thing is we can chose multiple actions which will be performed one by one. For example we can create a flow which on receiving an email will send a sms, create a file in Sharepoint and also create record in Dynamics 365.
- Sign in to https://flow.microsoft.com/ and click “See all ” link
- Search and select Gmail
- Click “When a new email arrives”
- Click menu and sign in using your Gmail account using “+ Add new connection”
- Click “add an action”
- Type Dynamics and then click “Dynamics 365 – Create a new record”
- Click menu and then from “+ Add new connection” sign in to Dynamics 365 account
- Select your Dynamics 365 organization name in “Organization Name” field
- Select ‘Contact’ as entity from “Entity Name” field
- After selecting entity name more fields will be loaded in “Create a new record” form
- In form click “Last Name” and then from dynamic content list select “Sender’s Name”
- Similarly select “Email” in create a new record form and then from dynamic content “From” email address
- Press Save button to save the Flow and that is all !
- Send email to linked account and after 3-4 second verify new contact created in Dynamics 365 from email received.
- Click “My flows” link and then click flow listed to verify its execution was successful
This demo was created using Gmail, but for Outlook, “Outlook.com” and “Office 365 Outlook” two connectors are available. One catch though is at the time they do not offer senders name as dynamic content. A solution can be to redirect Outlook emails to a Gmail box and configure Gmail to create a contact in Dynamics 365.
About Me 🙂
I m an IT consultant working in Melbourne Australia. I solve business problems using Microsoft technologies (Dynamics 365, Office 365, Azure, Flow, Power Apps, Power BI). I m involved in community activities and I blog at http://www.crmtechie.com/
I love to get connected with people working in IT, providing solutions or who just like Microsoft technologies. To get in touch please follow my blog, and connect through Linkedin, Twitter or Facebook