Create smarter flows using Microsoft Cognitive Services LUIS
Azure cognitive services language understanding intelligent service (LUIS) lets you understand language contextually, so your apps communicate with people in the way they speak.
The LUIS integration in Flow enables you to make predictions on a query string. You can design your Flow to execute a set of actions when the desired intent is detected. This post walks you through setting up a Flow to automatically create a calendar entry when your team requests a meeting on Yammer.
Create your LUIS app
If you are already using LUIS, sign in. You can also sign up here. Once logged in, click on New App and then select New Application.
In the window that appears, provide more information about your app and click on Add App.
You will be navigated to the application dashboard where you can define new models and train your app. Click on the plus sign next to Intents in order to add a new intent.
In the dialog that follows, provide the intent name and an example string. Save your intent.
Similarly, click on the plus sign next to Entities to add a new entity. Provide a suitable name and save.
Similarly, you can create multiple intents and entities. You are now ready to train your app.
Provide examples of utterances that contain the models you defined in the previous steps. Figure below shows an example of one such utterance. Train your app by marking the models on the example string.
Repeat this for several utterances until your app starts to make the right predictions. You're now ready to use your app in Flow.
Make a connection
The first step to build your Flow is to make a connection to your cognitive services account.
Click on the settings menu on the top right corner of the Flow website and pick Connections. On the page that opens, click on Create connection.
From the list that opens, click on the plus sign next to LUIS.
Provide your LUIS API Key and Create connection.
You are now ready to build your Flow.
Set up your flow
- When a new message is posted on Yammer, detect intent of the message using LUIS Get prediction action. To specify the expected intent, pick a pre-defined value from the Desired Intent dropdown.
- Add a condition to check if the desired intent is found. In this case, output Is Desired Intent equals True if ‘Create Calendar Entry’ is detected.
- Use the Get entity by type action to fetch ‘Start Time’ from the query string.
- Similarly, fetch ‘End Time’.
- Using the entity values from #3 and #4, create a new event in Google Calendar.
We're always interested in hearing your feedback; please let us know how your experience was and if there is anything we can do better. We look forward to your feedback!
• Follow @MicrosoftFlow on Twitter
• Join the conversation on the Microsoft Flow Community