Microsoft Power Automate, which was previously known as Microsoft Flow, is a SaaS platform by Microsoft for automation of recurring tasks. It is part of the Microsoft Power Platform line of products together with products such as Power Apps, Power BI and Power Virtual Agents. Power Automate supports different kinds of flows like Cloud flows, Desktop flows and Business process flows using which you can automate repetitive tasks to bring efficiencies to an Organization.
In this blog post, we will explore how to schedule a meeting in the Teams app using Microsoft Power Automate flow.
To Schedule Meetings
1. Sign-in to Power Automate (https://flow.microsoft.com) using your Microsoft account.
2. Click on “My flows” in the left navigation pane and then click on “+ New” to create a new Instant cloud flow.
3.In the search box, type “HTTP request” and select the “When an HTTP request is received” trigger.
You will be prompted to provide a schema for the HTTP request. You can either manually define the schema or use a sample payload to generate it automatically. This schema will define the structure of the incoming HTTP request data.
//Request Body Interview JSON schema
{
"type": "object",
"properties": {
"InterviewId": {
"type": "integer"
},
"CandidateName": {
"type": "string"
},
"CandidateEmail": {
"type": "string"
},
"InterviewerEmail": {
"type": "string"
},
"StartTime": {
"type": "string"
},
"EndTime": {
"type": "string"
}
}
}
4. Now click on the “+ New Step” button below the HTTP request trigger.
5.In the search box, type “Create a Teams Meeting” and select the action from the list of available actions. Now fill the details as follow in the image.
[Note : If you want to schedule for more than one attendees then it should be separated by semicolon “;”]
Keeping track of the meeting ID is important if you need to reschedule or cancel the interview in the future. You can store the meeting ID in a SharePoint list, Excel file, or SQL database, depending on your organization’s needs and preferences.
In this example I am going to use my Azure SQL database called “Interview”.
6. In your Power Automate flow, add a “+New Step” and search for “Execute a SQL Server query” action and select it.
7. In the action configuration, enter the following details:
Server name: Enter the name of your SQL Server.
Database name: Enter the name of the database where you want to execute the query.
And write the SQL query to save the MeetingId in the Interview Table
Great! We are almost done now, save the flow. Once you have created your Power Automate flow with an HTTP trigger, you can test it using a tool like Postman.
8. I am going to utilize my existing interview object from the database. This will schedule an interview in teams on 22nd June 2023 at 6pm to 6:30pm.
The test has successfully passed.
If you check the database the meeting Id is updated. And the meeting is scheduled in your calendar.
Conclusion
We have successfully implemented a Power Automate flow that utilizes an HTTP trigger to create a Teams meeting and store the corresponding meeting ID in a SQL database. In the upcoming blogs lets learn how to consume this power automate flow in your .NET application efficiently.