This article in my Chatter Bot series is inspired by Meighan Brodkey‘s awesome Automation Hour presentation about Automatically Adding Users to Chatter Groups and Public Groups.

If you haven’t watched it yet, go ahead and do it now, I’ll wait =)

One of the Meighan’s listeners asked:

“How can I automate sending a welcome Chatter post to new members of Chatter groups with key requirement that the post must come from a specific user such as the community manager?”

What a great idea! And an excellent question. How can we achieve this?

The Requirements

I see two main requirements in the question:

  1. Automate actions when a user is added or removed from a group
  2. Make a Chatter post as someone else and not as the current user

The Challenges

As seems par for the course in this Chatter Bot series, at the time of this writing, Process Builder does not support CollaborationGroup or CollaborationGroupMember objects. The lack of support for these objects makes using Process Builder a bit difficult so I developed Chatter Bot for Groups to make this possible.

Introducing Chatter Bot for Groups

This solution, available on GitHub, is a way to easily listen for Chatter Groups being created or updated. It also lets you take action declaratively when users are added or removed from those groups or their role within a group changes. An example would be to automatically send welcome email or onboarding materials to new members of specific groups, like new hires.

Here’s a screen shot where I have used Process Builder to automatically post “hello” and “goodbye” messages to a user’s feed when they join or leave a  group. Check out the README of the project for quick start instructions for using Chatter Bot for Groups.

chatter-bot-groups-join-leave-posts

But Chatter Bot for Groups only solves the first part of the question, how to automate actions when members join or leave groups. And those actions will run as the current user. Notice in the above screen shot that the posts were made as me (Doug Ayers) when I, myself, chose to join or leave the group.

The next hurdle is how can we make a Chatter post as a specific user? That is, how can we impersonate someone so the Chatter post looks like it came from them instead of the current user?

 

Introducing Chatter Bot for Feeds

In my next post I’ll introduce another project I’ve developed lovingly named Chatter Bot for Feeds. One of its main goals is to assist with making Chatter posts as arbitrary users. This ability will satisfy the second requirement where we need automated posts to be made as the community manager for different internal or external communities.