Group Publishing Bots

Quickly and easily setup bots that post updates into your Groups on Workplace.

Overview

Workplace is a great platform for sharing information with coworkers and having rich discussions with your team. But you can also use Workplace to be notified about information and activity in other tools and services. This might be industry news, your organization's blog, or an update from a tool that you and your team use.

Group Publishing Bots enable you to quickly and easily setup integrations with other tools that post content into your Workplace Groups. These posts not only act as notifications, they can often be the seed for a discussion - helping you and your team stay on top of what's happening.

There's two ways to setup group publishing bots:

  • Custom RSS Feeds let you subscribe to updates from any website, blog or work tool that supports RSS or Atom.
  • Incoming Webhooks enable you to make simple HTTPS calls to post content into Workplace. Because they include an access token, you can post content into Workplace from any tool, service or device that has an internet connection.

Custom RSS Feeds

The easiest way to setup a Group Publishing Bot is to subscribe to an RSS or Atom feed. Workplace will poll the feed around every 5 minuites, and when a new entry appears in the feed, a post will be shared to Workplace.

You can use this, for example, to subscribe to a blog, or get automatic posts from any tool that outputs RSS/Atom.

To setup a custom RSS feed:

  1. On the web, go to the Workplace Group you'd like to setup the bot in
  2. Go to the Integrations Tab.
  3. In the "Create Group Publishing Bot" section, click "Add Feed".
  4. Paste in the URL of the RSS or Atom feed you'd like to subscribe to.
  5. Optionally, you can set a custom name and icon for your bot. If you don't, Workplace will use the image and title from the RSS/Atom feed.
  6. Click "Create"
  7. Your Group Publishing Bot is now setup. When new items are added to the RSS/Atom feed, they'll be posted into your Workplace Group within 5 minutes.

Incoming Webhooks

Incoming Webhooks enable you to make simple HTTPS calls to easily post content into Workplace Groups.

When you setup an Incoming Webhook, you'll be given a URL that contains an access token. When you make an HTTPS POST to this URL with the appropriate parameters, a post will be shared into the Workplace group instantly. Because this URL contains an access token, you can post content into Workplace from any tool, service, or device that has an internet connection.

For example:

POST https://graph.facebook.com/group/feed?access_token=<YOUR_ACCESS_TOKEN>
{
"message": "Hello, World!",
"link": "https://www.facebook.com/workplace"
}

If your post was successful, the response will include an ID to the post that was just created:

{
  "id": "1110346210309_21002838611960",
}

And your post will be visible on Workplace:

You can use the ID returned in the original POST request to lookup information about your post, for example: a sum of the number of reactions and comments on your post:

GET https://graph.facebook.com/<YOUR_POST_ID>?fields=link,message,publishing_stats&access_token=<YOUR_ACCESS_TOKEN>
{
  "created_time": "2018-01-01T01:20:53+0000"
  "message": "Hello, World!",
  "link": "https://www.facebook.com/workplace",
  "publishing_stats": 24
  "id": "<YOUR_POST_ID>"
}

For additional information on how to post content to Workplace groups, see the Facebook Graph API documentation for Facebook Groups.

Permissions and Scope

The access tokens you get when setting up an Incoming Webhook have extremely limited scope. They can only be used to post content to the specific Workplace group in which they were enabled. Incoming Webhook tokens cannot be used to access any user data (e.g. people's names, profile pictures), any information about the group (e.g. the group name or member list), nor any content within the group (e.g. posts and comments). Their sole purpose it to allow you to programmatically post content into a particular Workplace group.