For those that don’t know we run a “Community Team” on our Teams Tenant and one of the challenges I wanted to solve was adding the Collab365 Today posts to a channel and for them to look nice (as cards). If you want to see this action, join our team and look at the “Shows, Events, News and Announcements” Channel.

The end result looks like this:

Example of an RSS Feed in Teams using Cards

In the image above each post is presented nicely in what is known in Teams as a “Card”. BTW, there’s also a connector that you can easily add to Teams for an RSS Feed, which is configured and presented below. We already blogged how to use this here in : ‘TIP: How to automatically send a message to a Teams Channel / Tab when a new blog post is created‘. This approach is VERY quick, but does have drawbacks, so keep on reading!

Add an RSS Connector in Teams

Drawbacks with the standard Teams RSS Connector:

There are a few problems with the main RSS Connector, namely:

  1. You can’t pick and use custom fields from your RSS Feed. This means, if you’ve got a a custom RSS Feed that uses non-standard columns you can’t show them. For example, we have a custom Url field that we wanted to use, not the default one.
  2. It piles all of the feed items together in a single card, so you can’t comment on each one by hitting “reply”. You can only comment on ALL articles grabbed in the last scheduled period.
  3. It doesn’t look as elegant (see below).
  4. It can only be configured to run every 15 mins, 30 mins, 1 hour, 6 hours, 12 hours, Weekly or Daily.
  5. Your RSS feed might be inaccessible due to firewalls or security.

Displays the standard RSS Feed in Microsoft Teams

So I set about trying to solve the solution shown at the start of this post and looked to use a tool that we use on plenty of other integrations called Zapier! Here’s how it’s done. 

Note: This example uses our Collab365 Today feed which aggregates over 350 bloggers posts. Take a look at what the content looks like on Collab365 Today. If this is something that you’d like in your own Teams feel free to follow this tutorial and add it. My recommendation is to create a separate channel called something like “Office 365 Community Posts” so that you don’t fill your “General” Channel with tons of posts from around the community. Interesting and useful as they are, not everyone is an avid reader!

So here goes…

Step 1: Sign-up for a Zapier account.

Zapier has a free account allowing you to make 2 Zaps.

Step 2 : “Make a Zap”

Once you are logged in, click “Make a Zap” at the top of the menu and you will then be taken to the main Zap Editor. 

Step 3 : Define the Trigger (when the Zap runs)

The first thing you want to do on this screen is create a new step and add the “RSS by Zapier” action and just click “Continue”.

Select new item from the RSS Menu

Step 4: Setup the Zapier Options

Now we want to tell the Zap all about our feed and when it needs to run.

Add the RSS Feed Url into Zapier

  • Add “https://today.collab365.community/feed/today?24” into the “Feed Url” box and click “Continue”.

Step 5: Test the step

This will simply call the RSS Feed and then you’re good to go.

Step 6 : Add a new Step and choose the “Webhook” App

To consume the Tweet RSS Feed (we created in the first step), you now need a way to send the posts over to Teams. We do this by using a Webhook.

What is a Webhook? The simplest way to explain a Webhook is that it’s like having a telephone number (in Teams) that other services can call to leave a message. Teams can then take action with that message and in our case post to a channel. A webhook allows API’s to talk chat to each other in the same was as Web pages and forms allow humans. If you’d like to see the technical explanation have a read of this

Choose a Webhook App from Zapier

Step 7 : Choose Custom Request (Not PUT, POST or GET)

Now this is where it gets a bit more complicated but, still pretty easy if you stick with me. If you use the PUT, POST or GET for your Webhook then you won’t be able to configure (pick your fields) and send the JSON over (that will define the Card) in the structure that Teams craves for. 

Select a Custom Request Webook

Step 8 : Go to your Teams Channel and create a new “Incoming Webhook” Connector.

Before carrying on with Zapier, you need to pop back over to Teams to make a new “Incoming Webhook”. This Url is what you will need to paste into Zapier so it knows where to send the Card to.

Instructions:

  • Navigate to the Channel where you want the RSS posts to be shown.
  • Hover over the channel and click the 3 dots “…”
  • On the channel menu select “Connectors”

Create an incoming Webhook Connector in Teams

  • Click “Add”
  • Click “Install”
  • Add a name and image then Click “Create”
  • On the final screen you need to copy the url (as highlighted below)

Configure the incoming Webhook

Step 9 : Edit the Template and add the JSON

Back in Zapier, you need to copy the Url from the previous step and paste it into the “URL (required) box.

Paste your Teams incoming webhook url into Zapier

Step 10 : Add the data template JSON

You now need to create a JSON message that conforms to the Teams required Schema. (As seen below). There are only 3 things you need to replace:

  1. Title : The title of the card
  2. Text : The description below the title
  3. Url : The url that will be navigated to when they click the button (refer to first image to see how it looks)

Add the JSON template to create a Teams Card

Here’s the template for you copy, you will want to replace each of the tokens with your own field names by clicking the “+” sign at the top right of the Data screen.

{
"@context": "http://schema.org/extensions",
"@type": "MessageCard",
"title": "{{INSERT TITLE HERE}}",
"text": "{{INSERT DESCRIPTION HERE}}",
"potentialAction": [
{
"@type": "OpenUri",
"name": "View Blog Post",
"targets": [
{ "os": "default", "uri": "{{INSERT URL LINK HERE}}" }
]
}
]
}

This is a working one set-up to consume the Collab365 Today feed. (Note: you will need to pick them again, and you want to pick the “Redirect Link” field in the “uri” value.

{{
"@context": "http://schema.org/extensions",
"@type": "MessageCard",
"title": "{{32688130__title}}",
"text": "{{32688130__description}}",
"potentialAction": [
{
"@type": "OpenUri",
"name": "View Blog Post",
"targets": [
{ "os": "default", "uri": "{{32688130__raw__redirectlink}}" }
]
}
]
}

That’s it! Once you’ve saved and tested it you will have posts in your Teams channel automatically!

One thing to note, I’ve used RSS as the example for the data source, but Zapier has 100’s of apps that you can get data from like CRM’s, SQL sources, Email, social sources. The world is your oyster with this as virtually the same process can be used.

Happy Teaming and if you have a new recipe for getting data into Teams let us know in the comments…

(11926)

Views: 11.93K  | Categories: Microsoft Teams
About The Author
  • Dean Gross says:

    Thanks, this approach worked very well for me. I’m curious, how does this compare to doing the same thing with MS Flow?

  • olav12 says:

    Im getting an error, “We had trouble sending your test through.
    The app returned “Bad payload received by generic incoming webhook.”. This usually happens when your Zap is missing a required field or a field value isn’t in a recognized format.”