Publish SharePoint Announcements into Microsoft Teams

The announcements you publish inside your intranet can reach a broader audience if you propagate them to Microsoft Teams.

The solution provided in this article provides a method to publish announcements from SharePoint into Microsoft Teams and it can be easily implemented by any IT-Pro as it does not require coding skills.

Combining SharePoint, Flow, Teams and Adaptive Cards IT-Pros can get super powers and revolutionize the way collaboration is done inside companies.

SharePoint configuration

  1. Go to Settings -> Site Contents
  2. Click New – Add an app and select Announcements
  3. Provide a name to the Announcements list
  4. Once the list is created click on Settings and then List Settings
  5. Click on the Body column
  6. Select Plain text and click ok

Microsoft Flow configuration

  1. Open Microsoft Flow
  2. Create a new Flow and select Create From Blank
  3. Chose SharePoint triggers and then When an item is created
  4. Connect to the Announcements list
  5. Click on New Step
  6. Choose Microsoft Teams action and then Post your own adaptive card as the Flow bot to a channel
  7. Connect to the Team and the Channel where you want your messages posted

Adaptive Card configuration

Adaptive Cards are a new way for developers to exchange card content in a common and consistent way and this is exactly what we will use to display the announcements inside Microsoft Teams.

With the new functionality provided by Microsoft Flow you can create your own adaptive cards using the designer and then paste the JSON in the Message text field.

To publish your announcements, copy the code bellow and paste it in the message field on Flow.

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "items": [
                {
			"type": "TextBlock",
			"size": "Medium",
			"weight": "Bolder",
			"text": "@{triggerBody()?['Title']}",
			"wrap": true
		}
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "Container",
                    "items": [
                        {
                            "type": "TextBlock",
                            "id": "Description",
                            "horizontalAlignment": "Left",
                            "height": "stretch",
                            "text": "@{triggerBody()?['Body']}",
                            "wrap": true
                        }
                    ]
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "items": [
                                {
                                    "type": "Image",
                                    "style": "Person",
                                    "url": "@{triggerBody()?['Author']?['Picture']}",
                                    "size": "Small"
                                }
                            ],
                            "width": "auto"
                        },
                        {
                            "type": "Column",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "weight": "Bolder",
                                    "text": "@{triggerBody()?['Author']?['DisplayName']}",
                                    "wrap": true
                                },
                                {
                                    "type": "TextBlock",
                                    "spacing": "None",
                                    "text": "@{triggerBody()?['Created']}",
                                    "isSubtle": true,
                                    "wrap": true
                                }
                            ],
                            "width": "stretch"
                        }
                    ]
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
}

Once the entire setup is ready, add a new entry to the SharePoint list, after a few seconds it will be published on Microsoft Teams with a good-looking card showing not only the announcement but also the information about its creator.


Mockup vector created by freepik – www.freepik.com


No comments yet

Leave a Reply


Web developer focused on SharePoint branding, blogger, tech enthusiast. Travelling and sports are my addictions, knowledge and success are my daily motivations.