Getting Started with Process Builder – Part 82 (Recipes for Automating Chatter Group Management)

Getting Started with Process Builder – Part 82 (Recipes for Automating Chatter Group Management)

Last Updated on December 5, 2020 by Rakesh Gupta

Chatter Group is one of the great ways to boost collaboration in your organization. A Chatter group represents a group of users – one can add unlimited members to a Chatter Group, but a user can join a maximum of 100 Groups. 

Below are few tasks, related to Chatter group membership, that can be automated to enhance productivity.

  • Send email notification to group owner or managers when someone joins a Chatter Group
  • Send email notification to group owner or managers when someone leaves a Chatter Group
  • Auto update new member’s email frequency for a Chatter Group
  • Promote a user to Chatter group manager if he belongs to a specific Role 

Until now, it was necessary to write Apex code to manage the aforementioned task. Since Spring’18 release, however, it is now possible to manage these task with the help of Flow and Process Builder. Let us see how to get started on working smarter by tackling a business use case.

Business Use Case

Martin Jones is working as a System Administrator at Gurukul on Cloud (GoC)At GoC they use Chatter extensively to collaborate internally. Martin has received three requirements from the upper management:

  1. When someone joins ‘GoC Awesome People’ Public Chatter group, set their email frequency to – Email on Each Post. 
  2. Notify group owner when someone joins the Group. 
  3. When a user joins GoC Awesome People Group, and he/she belongs to ’Customer Support, International’ role, automatically promote him/her to the group manager. 

A solution for the above business requirement

There are a few possible solutions for the above business scenario, but we’ll use  Flow and Process Builder to solve the above business requirementBefore trying to understand the technical aspect of the solution, let us spend some time to understand the general flow at a high level. Please spend few minutes to go through the following flow diagram and understand it.

Before we proceed further, let us understand the characteristics of CollaborationGroupMember – It represents a member of a Chatter group.

  1. First of all, create a public Chatter group GoC Awesome People, as shown in the following screenshot: 
  2. Now we will create a Flow to send an email notification to group owner with details. 
  3. Navigate to Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Flows. Click on the New Flow button; it will open the Flow canvas for you. Create variables in the Flow, as shown in the following table:
    Name Variable type Input/Output type
    VarTGroupOwnerEmail Text Input and Output
    ForGroupMemberName Formula (Text) {!$User.FirstName} & ” ” & {!$User.LastName}

    We will pass the value to {!VarTGroupOwnerEmail} variable through Process Builder.

  4. Click on the Palette tab and drag and drop the Send Email static action onto the canvas; it will open a new window for you. Map the Send Email static action element according to the following screenshot:

    1. For body use this text – {!ForGroupMemberName} joins GoC Awesome People Chatter Group
  5. Finally, your Flow will look like the following screenshot:
  6. Save the Flow (Type: – Autolaunched Flow) and name it Notification to Group Owner. Then close the canvas. Do not forget to Activate the Flow.
  7. The next step is to create a process, that will fire when a new member joins to a GoC Awesome People group. To do this, Navigate to Setup (Gear Icon) | Setup | Process Automation | Process Builder
  8. To create a new process from scratch, click on the New Button available on Process Management page. A popup will appear where you have to enter the Name (Use Email Notification When a User Joins Chatter Group as the name)API Name and Description as shown in the screenshot below:

    1. Once you are done, click on the Save button.
  9. Click on the Object node to add object and then select the Group Member object. For the entry criteria, select only when a record is created, as shown in the screenshot below:

    1. Once you are done, click on the Save button.
  10. The next step is to add Process Criteria. To do this click on Add Criteria, enter Name, Type of action and set filter conditions (In this case select No criteria—just execute the actions!) and click on the Save button, as shown in the following screenshot:
    1. Once you are done, click on the Save button.
  11. The next task is to update email frequency of newly joined group member and send an email notification to the group owner. 
    1. Now we will add first Immediate action into the Process to update email frequency of group member. Click on Add Action (Under Immediate actions), Select the type of action (In our case Update Records), and then fill the values into fields to define the action – as shown in the following screenshot:
    2. Now we will add second Immediate action into the Process to send an email notification to the group owner. Click on Add Action (Under Immediate actions), Select the type of action (In our case Flows), and then fill the values into fields to define the action – as shown in the following screenshot:
  12. Our third task is to automatically promote a member to group manager if he/she belongs to Customer Support, International role. To achieve this we will add second Process Criteria into our process. Click on Add Criteria, enter NameType of action and set filter conditions, and follow the instructions below
    1. For Criteria for Executing Actions, select Conditions are met
    2. Set condition –  [CollaborationGroupMember].Member.UserRole.DeveloperName equals CustomerSupportInternational
  13. Now we have to add an Immediate action into the Process to update member’s role. Click on Add Action (Under Immediate actions), Select the type of action (In our case Update Records), and then fill the values into fields to define the action – as shown in the following screenshot:

    1. Once you are done, click on the Save button. 
  14. In the end, your Process will look like the following screenshot:
  15. Do not forget to activate the Process by clicking on the Activate button.

It’s time to test this feature

Next time, when a user joins a Chatter group, a process will fire and (1) update email frequency; (2) trigger an email notification to group owner; and, (3), based on a user’s role, it will also update his/her Chatter group role.

In this demo, I have used a user who belongs to role – Customer Support, International 

I hope you enjoyed, and learnt, from this blog post, about how to automate Chatter group membership related tasks. Mastering these skills will enhance your productivity and propel you to try various permutations and combinations to incorporate automation in your day-to-day processes and procedures.

Please feel free to add constructive comments and insights to the blogs.

Technical Editor and Proofreader: - Munira Majmunda
Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

3 thoughts on “Getting Started with Process Builder – Part 82 (Recipes for Automating Chatter Group Management)

  1. Hello Rakesh,
    Thanks for this awesome article,could you let me know that complete requirement can be accomplished via process builder means sending Email (incorporated via flow) can be done via process builder as well ?
    Is there any specific reason we have used flows, could you guide me on this point ?

    Thanks,
    Ritu Ghosh

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.