To understand how to solve the same business use case using Process Builder. Check out this article Getting Started with Process Builder – Part 24 (Automatically Add User to a Chatter Group).
Big Idea or Enduring Question:
How do you automatically add users into a Chatter Group?
This blog post will help us to understand the following
- Use After-save Record-Triggered Flow add users to a chatter group
- Add a Time-dependent action in After-save Record-Triggered Flow
- What is a MIXED DML error and how to avoid it?
- Monitor Time-based flow queue
Business Use case
Brenda David is working as a System administrator at Universal Containers (UC). Her next assignment is to create a process to auto add a new user to Chatter Group (UC Internal Announcements).
Automation Champion Approach (I-do):
The process of creating a new user can involve many steps that have to be repeated for each person. This can become time-consuming for admins. However, this process can be made easier with automation.
While this can be solved using various automation tools like Apex or Process Builder, we will use After-save Record-Triggered Flow. Check out this article to understand why we are using after-save record-triggered flow for this scenario.
Before proceeding, ahead, understanding CollaborationGroupMember objects in Salesforce. It represents a member of a Chatter group.
|CollaborationGroupId||Represent Id of the Chatter Group|
|MemberId||Represent Id of the User (Group member)|
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it.
Let’s begin building this automation process.