In this blog, we’ll see how an alerting message can be sent to Microsoft Teams when a user creates a new item in a SharePoint list. The post assumes that you have a general knowledge on Microsoft Teams and understand the concept of Teams and Channels. We also use Microsoft Flow to hook it all together.
Microsoft Teams is a hub for teamwork, communication and collaboration. It is well integrated with Office 365 meaning that people can use SharePoint, Word, Excel, Delve, PowerPoint, Power BI and Flow etc. etc… all within a channel just by adding tabs for each service. Teams also allows you to connect with many third party services like Facebook, GitHub and RSS feeds, making it a very powerful integration tool.
Microsoft Teams can be integrated with a document library of an existing SharePoint site, allowing us to add folders and files straight from the Teams user interface without having to open the SharePoint site. Using third party services or custom connectors we can post messages and notes straight into a Teams Channel.
In the rest of this post I’m going to show you, step by step, how you can configure the integration between Teams and SharePoint so that you get a notification, on your Teams Channel, every time a new item is added to a SharePoint list or document library. This can be extremely useful way to notify your Team members when important information, that they are required to read (e.g. new policy, announcement or corporate news article ) is published on your corporate SharePoint Intranet.
- Browse and signup into your SharePoint site and create your List with columns that you want to have.
- Now, you need to launch site or desktop version of Microsoft Teams, and signup using your credentials. You can create new teams by clicking on “New Team” button at the bottom of the screen.
- Once you have a team. Click on (…) to enable a context menu. Select the “Add channel” option to create a new channel.
- On the following screen, you need to provide the name of the channel and can also add a description for this channel. Click on the “Add” Button to continue.
- Now, you can check your newly added channel on the screen. Click on (…) to add Connectors from the context menu.
- On the following screen, you need to add “Incoming Webhook” channel from the given options. Click on “Add” button to continue.
- You need to provide a name for your connector on this screen. Also, upload an image for this “Incoming Webhook”. Click on “Create” button to continue.
- Now, you need to copy the URL from the text box. Also, you can use the “Copy to Clipboard” option to copy the URL. Click on “Done” button and close the connectors screen to continue.
- On the following screen, you should be able to see a new message from newly added “Message from SharePoint list” connectors inside Conversations tab.
- Now, go back to SharePoint list and click on “Create a flow” from Flow menu of the screen. It will take you to Microsoft Flow site.
- If you have not signed in on Microsoft Flow. You need to sign in and click on “Create a flow from blank” template.
- On this screen, you need to provide flow name and select “SharePoint” tile from SERVICES section on the screen.
- Now, you need to select a Trigger “SharePoint – When a new item is created “on the screen.
- On the following screen, you need to provide the SharePoint site “URL” and select the list name from the dropdown.
- Click on “+ New step” button to add an action.
- On the following screen, you need to type “HTTP” in the search textbox and click on “HTTP” tile from the search result.
- You need to set value for following field on the below screen
- Method: Post
- Uri: provide URL which were copied from the connectors screen of the Microsoft Teams.https://outlook.office.com/webhook/[email protected]8548768ec/IncomingWebhook/4c45acfc58erererewew4599f9190f4556/adf5c9b9-49c6-47ac-82c1-919ddbea7896
- Body: select the fields that you want to display in your message to Microsoft Teams and organize the body in the JSON format particularly.
- Click on “Create flow” button to create Microsoft Flow for the SharePoint list. And, you can hit “Done” button to finish off this flow.
Note:- Do not forget to add “text” in body part of the Action.
- On the following screen, you can see if your newly created flow is running.
- You can check the created flow by clicking on “See your Flow” Menu item. This flow should be associated to the list and appears in My flows tab as depicted below in the screen.
- Now, you can create a new item in the SharePoint list to test the complete functionality.
- The new item has been added to the SharePoint. You can check your flow to see if there is any issues.
- Then on your MS Teams screen, you should see that from the item creation in the SharePoint list we have gone all the way through to getting a message posted on our Teams channel.
Finally, we are done!
I hope, you’ve enjoyed reading and applying steps using this blog.