Documentation

Slack integration

The Slack integration allows your users to: 

  • see link previews when they post intranet URLs in Slack
  • search the intranet and post search results directly from Slack
  • receive automatic messages about new intranet activity in Slack.

Slack integration admin page

To access administrator settings for the Slack integration, go to the Admin panel: Integrations section > Slack page.

For information for your users on how to use the Slack integration, see Slack integration user instructions. Users must connect their Slack and intranet accounts to be able to post link previews or search the intranet from Slack.

App Configuration

See Slack integration setup for steps on how to set up the Slack app and configure it on your intranet.

Slack image thumbnails

In the App configuration tab, there is a checkbox option to Enable Slack image thumbnails, which is unchecked by default. ThoughtFarmer uses cookie-based authentication which prevents Slack from loading images. Enabling this feature allows Slack to access images in ThoughtFarmer using token-based URL authentication instead of cookies. If this setting is not enabled, thumbnail images will not display in link unfurls, search results or activity messages.

URL tokens expire after 7 days, but all current tokens can be forced to expire by clicking the link Expire all image tokens now on the Slack admin page.

Activity messages

An activity message is an automatic notification of new activity from a specified section of the intranet that is sent to users in a specific Slack channel. Admins set up activity messages and choose where on the intranet the activity comes from, what type of activity triggers a message, what Slack channel it is delivered to, and whether the content must be secured by a security group in order to trigger a message. Admins can create as many different activity messages as they want. Only new, public content will trigger activity messages. Activity messages will show metadata such as the page title, the name of the page creator, a thumbnail image and a summary or excerpt of the content.



As an example, you can set up an activity message to send messages to your Slack #events channel any time a new company event page is created.

One or more security groups can be added so that only content secured by at least one of the security groups is sent. However, Slack is not governed by the security permissions that are applied to each page on the intranet. So it is possible for a Slack user - even one who does not have an intranet account - to see activity messages and link previews for intranet pages they do not have access to. However, if they try to visit an intranet link, intranet security will still apply to whether they can view the page.

Once activity messages are created, they can be toggled on or off at any time. Use the icons on the right of the activity messages to edit or delete them.

Set up an activity message

  1. Go to the Admin panel: Integrations section > Slack page. Click on the Activity messages tab.
  2. Click +Add to create a new activity message. The Add new activity message window will appear.
  3. In the Name field, give the activity message a name. This name only appears on the Admin page, for admins to be able to differentiate the different activity messages they have set up.
  4. In the Intranet section or page field, start typing the name of the page or section you want intranet activity to come from. When the page name appears in the dropdown, click on it to select it.
  5. Select the radio button for whether you want to see activity messages for new activity on this page or section only, or for any page in the section (the page and its subpages).
  6. In the Slack channel field, type the name of the Slack channel that you want the activity messages to be sent to.
  7. Under Content types, select the checkboxes for all of the types of activity that you want to trigger activity messages.
  8. Under Filter activity by security group, you can specify that content must be secured by one of several security groups to be allowed to post an activity message about that content. To add a security group, click in the Select a security group field, start typing the name of the security group, and click on it when it appears in the dropdown.
    • If you don't add a security group, Slack users may see page titles and summaries that they don't have permission to view on the intranet.
    • If you list multiple security groups, an activity message will be sent if it is secured by any of the groups.
  9. Click Save.

Configure Slack channels to receive activity messages

The Slack app that you have created needs to be added to every Slack channel that you want to be able to receive activity messages.
  1. In Slack, navigate to the channel that you want to be able to receive activity messages.
  2. Click on the info icon in the top bar to open the About this channel sidebar.
  3. Click on Apps in the sidebar.
  4. Click the Add App button.
  5. Start typing the name of your Slack app in the Search field to narrow down the list of apps.
  6. Find your Slack app and click Add on the right. A message will appear in the channel that you have added the app to.
  7. Repeat the above steps for every channel that you want to be able to receive activity messages.

Link previews and search

When intranet links and search results are shared in a Slack message, the links unfurl or expand to show a link preview including the page title, a thumbnail image (if available), and a summary or excerpt of the body content.



If a link to a profile page is shared, it will expand to show the person's name, profile picture, job title and contact information.

Individual users must link their Slack and intranet accounts in order to see link previews for URLs and search results.

Set a security group for link previews

Admins can set a security group in the Security group: view permissions field, so that when a user posts a link in Slack, it will only show a link preview if it is secured by that security group. If the link content is not secured by that security group, the link url (which may include the page title) will show, but the link will not unfurl to show more details.

More than one security group can be added to this field. If the link is secured by any one of the security groups added here, the link preview will display.

Slack is not governed by the security permissions that are applied to each page on the intranet. So it is possible for a Slack user - even one who does not have an intranet account - to see activity messages and link previews for intranet pages they do not have access to. However, if they try to visit an intranet link, intranet security will still apply to whether they can view the page.

To add a security group:
  1. Go to the Admin panel: Integrations section > Slack page, Link previews and search tab.
  2. In the Select a security group field, start typing the name of the security group that you want to see link previews. Click on the security group when it appears in the dropdown. Repeat to add more than one security group.
  3. Click Save.

Show/hide breadcrumbs on link previews

By default, link previews display the breadcrumb for the linked content for most page types. Breadcrumbs do not show for profiles, shout-outs and updates. If desired, you can hide the breadcrumb from the link preview for some or all content types, using the config setting slack.unfurling.breadcrumb.pageTypes.
  1. Go to the Admin panel: Advanced section > Configuration settings page.
  2. In the Search config settings field, type slack to narrow the list of settings.
  3. Find the setting slack.unfurling.breadcrumb.pageTypes.
  4. Click in the Value column. Enter the Value you desire:
    1. To show the breadcrumb on all page types, enter *.
    2. To hide the breadcrumb on all page types, delete the * and leave the field blank.
    3. To show the breadcrumb on some page types, enter a comma-separated list of the page types you want the breadcrumb to show on, using the values in the list below.
      • Page, Section, Link, ExternalLink, Calendar, PhotoGallery, NewsBlog, Forum, Group, Post, PostLink, ExternalPostLink, CalendarEvent, Document, Poll, MailingList, MailingListThread, MailingListThreadPost, Root, PollRoot, ProfileRoot, GroupsRoot, RssRoot, ForumTopic, Folder, RssNewsBlog, RssExternalPostLink, Form
  5. Click Save.

Search: slash command

Users can search the intranet from Slack using the slash command that the admin creates when creating the Slack app. Users enter the slash command along with the keyword(s) they want to search in Slack. (eg. /searchintranet quarterly meetings) Search results will be returned 5 at a time, and users can click send beside a search result to share it with the channel they have performed the search in.

9.7Admin125931SlackSearch.bmp

The Search: slash command field is a place to record the slash command that the admin creates when creating the Slack app. This field is for reference only and has no connection to the Slack app. If the slash command is changed on the Slack website, it will need to be changed manually in this field.