Last Updated on March 6, 2022 by Rakesh Gupta
Big Idea or Enduring Question:
How do you auto-create a chatter group using Salesforce Flow?Objectives:
This blog post will help us to understand the following- Understanding Quick actions
- How to use the quick action in Salesforce Flow
- Add a Time-dependent action in After-save Record-Triggered Flow
Business Use case
Warren Mason is working as a System administrator at Gurukul on Cloud (GoC). His organization wants to auto-create a private Chatter group, whenever an active campaign gets created. For the Chatter group name, they want to use the campaign name.Automation Champion Approach (I-do):
Actions allow users to perform certain activities very quickly – such as create records, update records, send an Email, log calls, call a Lightning component, execute Lightning Flow, and call a Visualforce page.With custom actions, users save precious time by getting quick access to important information. It also has the capability to pre-populate the data from the record. There are two types of actions available to users: object-specific and global.
- Object-Specific Actions:- These actions have automatic relationships to other records. The actions let users quickly create or update records, send an Email, log calls, call Lightning components, execute Lightning Flow, and call a Visualforce page in the context of a particular object.
- Global Actions – A System Administrator can create global actions in Setup. Then, s/he can put global actions anywhere on an object that supports actions. Using global actions, users can log calls, create records, send an email, call a Visualforce page, execute a Lightning component, and call Custom Canvas, all without leaving the page.
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes going through the following Flow diagram and understand it.

Guided Practice (We-do):
There are 3 steps to solve Warren’s business requirement using Record-Triggered Flow. We must:- Define flow properties for record-triggered flow
- Add a decision element to check if the campaign is active
- Add Action – New Group
Step 1: Define Flow Properties
- Click Setup.
- In the Quick Find box, type Flows.
- Select Flows then click on the New Flow.
- Select the Record-Triggered Flow option, and click on Create and configure the flow as follows:
- Object: Campaign
- Trigger the Flow When: A record is created or updated
- Set Entry Criteria
- Condition Requirements: None
- Optimize the Flow For Action and Related Records
- Click Done.

Step 2: Using Decision Element to Check if Campaign is Active
Now we will use the Decision element to check if the campaign is active.- On Flow Designer, click on the +icon and select the Decision element.
- Enter a name in the Label field; the API Name will auto-populate.
- Under Outcome Details, enter the Label the API Name will auto-populate.
- Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
- Row 1:
- Resource: {!$Record.IsActive}
- Operator: Equals
- Value: {!$GlobalConstant.True}
- Row 1:
- When to Execute Outcome: Only if the record that triggered the flow to run is updated to meet the condition requirements.
- Click Done.
The reason why we would select the Yes checkbox for the question — Only if the record that triggered the flow to run is updated to meet the condition requirements — is to allow the Salesforce flow to execute the actions only if the record meets the criteria now, but the values that the record had immediately before it was saved didn’t meet criteria. This means that these actions won’t be executed when irrelevant changes are made.

Step 3: Add Action – New Group
Next, we will use another Core Action – New Group – to create a private Chatter Group. Now follow the steps below:
- On Flow Designer, below the Yes node, click on the +icon and select the Action element.
- Below Filter By, select Type.
- Search and select the New Group from the dropdown menu
- Label the new action Create a Chatter Group
- Set Input Values
- Row 1:
- Field: Access Type
- Value: Private
- Row 2:
- Field: Name
- Value: {!$Record.Name}
- Row 3:
- Field: Related Record ID
- Value: {!$Record.Id}
- Row 1:
- Click Done.

In the end, Warren’s Flow will look like the following screenshot:
Once everything looks good, perform the steps below:
- Click Save.
- Enter Flow Label the API Name will auto-populate.
- Click Show Advanced.
- Type: Record-Triggered Flow
- API Version for Running the Flow: 54
- Interview Label: Record-triggered: Campaign After Save Flow {!$Flow.CurrentDateTime}
- Click Save.
Proof of Concept
Now onwards, if a business user creates a campaign and makes it active, then Salesforce Flow will automatically trigger and create a Chatter group.- Now create a new campaign (Demo Campaign 1), as shown in the following screenshot:
- Navigate back to the Groups tab and check the newly created chatter group.
Formative Assessment:
I want to hear from you!What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? Feel free to share in the comments below.
Thank you for the quick response. I believe I am not following. Is NetworkID is Community.ID? Also, I am trying to create a process where if a filed in account is updated to “True”, then it should automatically create a community chatter group and have account owner as the group owner. Is it possible to do? IF yes, the above like can be taken as reference?
Chirag
Yes NetworkID is nothing but a CommunityID.
Thank you very much for your help. I was able to complete my task.
wow 🙂
Hi Rakesh,
Thank you for your help yesterday. I would like ask another help. Since you help me auto create Community Chatter group once an account is created, Do you have any documents to auto populate the URL of the community group in a custom filed under Account Object? This will give owner of the account direct access and make them aware of the existence the group related to the accounts they own.
Chirag
Use one Record Update element in your Flow to update account record with newly created Chatter link 😀
Thank you Rakesh, How do I Reference URLs for every Community Chatter group created by the flow/processbuilder? I would really appreciate if you could direct me to a step by step process. I am new at this 🙂
If I am not wrong you have used to create a Chatter Group. Record Create element allows you to save newly created record ID into a variable that you can refer later.
Hi Rakesh,
I want to create Community Chatter Group exactly the way you documented for the internal Chatter group. Do you have any document for that?
Thank you
Chirag
Consider using Flow (and set NetworkId) with Process Builder. Similar to this Getting Started with Process Builder – Part 78 (Auto Enable Lightning Experience for New Users), but make sure to add one more parameter NetworkId
Hi Rakesh,
Regarding the above process builder on – auto create a private chatter group. I am trying to do a similar thing by adding a button (Create chatter group) on Opportunity page, which users have the option to push if they want to create a chatter group on that deal with all deal team members. I have two questions related to this requirement:
1. I would like to create an object specific quick action rather than global action. But if i go with quick action, it just gives me an option between event, task and log a call. I don’t want those.
2. In the process builder above the type of chatter group didn’t give me an option of “unlisted”. We don’t want users to create private group instead we want them to create “unlisted groups”. Can you explain why.
Thank you for your help.
Regards,
Pooja
Here you go
1. Embed a Flow in a publisher action – https://automationchampion.com/2015/02/09/embed-a-flow-in-a-publisher-action/
2. You have to use both Visual Workflow and Process Builder.