Introduction
These instructions are provided to you as seen.
SmartFlo is all about driving business processes from your meetings. This document will show you an example where you integrate SmartFlo and post a message within a specific Microsoft Team’s Channel.
This is a simple example but one which we are asked for regularly so we thought we would deliver you a solution using the Power Platform that you can use.
Pre-requisites
You will need to have Microsoft 365 and access to a Power Platform environment. You will need to have a license for Power Automate Premium as well.
Installing and Configuring the Solution
The first step is to download the solution from our iThink 365 SmartFlo Repository, found here:
https://github.com/ithinksharepoint/smartflo/blob/main/smartflo-teams-integration/README.md
Find the latest release, click the link and choose to download the zip file.
Next
- Browse to https://make.powerapps.com
- Choose the environment that you wish to load the solution into and is licensed. If you have a production environment, then the suggest is to use that.
- Choose Solutions from the right-hand side.
- Click Import solution
- Click Browse
- Choose the solution file that you downloaded.
- Click Next
- You will be presented with the details of the solution.
- Click Next.
- Configure the connection to Microsoft Teams by clicking on the …
- If a connection already exists then choose otherwise to click add connection and fill in your Microsoft Teams details.
- Click Next
- Provide the Microsoft Teams Channel ID and Team Id.
- To get the Microsoft Team Id and Channel Id, do the following
- Open Microsoft Teams
- Click Chat
- Search for the Team.
- Choose the Team and Channel
- Click on the … and choose Get link to channel
- Click Copy
- Paste into notepad
- An example is shown below which has been redacted
- https://teams.microsoft.com/l/channel/19%3ARQZmq-vu3Vd5qAilIZPviiMd-NX2ZpBGLy2P6sReadacted%40thread.tacv2/General?groupId=22cb59d4-32df-4f8e-9f92-579bb293redf&tenantId=aaaaaaaa-fba9-457a-be40-4a25d1111111
- Team Id: 22cb59d4-32df-4f8e-9f92-579bb293redf
- Channel Id: 19%3ARQZmq-vu3Vd5qAilIZPviiMd-NX2ZpBGLy2P6sReadacted%40thread.tacv2
- Click Next
The package will be imported.
Once completed you will see the message.
Configure SmartFlo to call the Power Automate Cloud Flow
The following section will set up a SmartFlo template to call the Power Automate Cloud Flow.
We need the webhook URL from Cloud Flow to tell SmartFlo how to communicate with it.
Let’s show you how to do this.
From where you imported the solution.
- Click on the All Option
- Click on SmartFlo to Microsoft Teams Integration
- Click on the “Post Message from SmartFlo to Microsoft Teams Channel”
- Click Edit at the top of the window.
- Find the “When a HTTP request is received”.
- Click on it to expand it.
- Click on the copy icon next to HTTP POST URL
Armed with the URL
- Switch to Microsoft Teams.
- Open the Calendar App.
- Find the meeting you wish to configure.
- Open SmartFlo
- Click on the book icon and edit the template that you wish to configure.
- Click on the edit button next to the template you wish to edit.
- Scroll down the left side of the edit template window if you need to
- Paste in the HTTP POST URL from the Power Automate Cloud Flow into the Webhook URL.
- Click Save Changes.
You are now ready to run the meeting template to test out the integration with Microsoft Teams.
Improving the Teams Message Format
Here is an example of the message that appears in Microsoft Teams.
As you can see the message that is put into Microsoft Teams is not in the format that you want but that is easily changed.
Why did we do this?
We had to do it this way because we wanted to allow you to use this solution for any type of SmartFlo integration. Every SmartFlo template is going to put through different information.
To change it we need to go back to Power Automate and make some changes to the Cloud Flow so that it can detect the format of the message and then use that.
Let’s configure the Cloud Flow.
- Browse to https://make.powerapps.com
- Choose the environment that you installed the solution into.
- Choose Solutions from the right-hand side.
- Click on All
- Choose the SmartFlo to Microsoft Teams Integration
- Click on Post Message From SmartFlo to Microsoft Teams Channel
We need to describe what information is being sent to Power Automate.
To do that do the following:
- Ensure you have tested the webhook by running the template in SmartFlo.
- Look at the bottom of the Cloud Flow screen and you will see a section “28-day run history”.
- You should see an entry and hopefully it will say succeeded.
- Click on the entry
- Find the “When a HTTP requested is received” and click on it to expand.
- Under OUTPUTS
- Select everything that is in the Body window as shown below.
- Copy all the text, this is a JSON string.
- Now click on Edit.
- Expand the “When a HTTP request is received”
- Click on “Use sample payload to generate schema”
- The “Enter or paste a sample JSON payload” window will appear.
- Paste your text into the window.
- Click Done.
This will create a JSON schema which will help us pick out the information and insert into the Microsoft Teams message.
Now, scroll down and expand the “Post Message From SmartFlo to Microsoft Teams”
Update the *Message text box to display the message in Microsoft Teams as you would like!
You will likely want to remove the Body parameter and then update and choose the fields that have the information that you wish to input in the message.
Use what we have done below for inspiration.
Change this to
- Click Save
Now, retry the SmartFlo template!
Here is how the new message format looks in Microsoft Teams.
Much better!