Chatter is a great way to boost collaboration in your organization. In this article Getting Started with Process Builder – Part 13 (Post to Chatter), I had discussed a use case, whenever an event is created for the public calendar post its detail to a Chatter Group using the Process Builder. Process Builder allows us to posts a message to a specified feed, such as to a Chatter group, a user’s feed or a lead record. This article goes a step ahead and explains, how someone uses Flow and Process Builder to post to Chatter Feed of Related Record. Let’s start with a business use case
Business Use case
Donna Serdula is working as System administrator at Universal Containers. She has received a requirement to post Opportunity details (with Opportunity link) to the related Account’s feed, whenever an Opportunity gets created with an amount greater than $100k.
Solution for the above business requirement
There are a few possible solutions for the above business scenario, but I’ll use Process Builder and Flow to solve it. Before proceeding, you have to understand FeedItem objects in Salesforce. It represents an entry in the feed, such as changes in a record feed, including text posts, link posts, and content posts. Follow the below instructions to solve the above business requirement
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
2. Click on New Flow, it will open the Flow canvas for you. Now create few Text variables, as shown in the following screenshots
VarAccountID
VarOpportunityID
VarOpportunityName
3. The next step is to post a message (Type: – Link Post) to Account Feed, for this we will use Record Create element. Drag-and-drop Record Create element (Enter the name Post to Chatter) onto the canvas and map the fields according to below details
- Select object FeedItem
- Body= An Opportunity gets created with amount more than 100K
- LinkUrl= https://na17.salesforce.com/{!VarOpportunityID} [replace na17 with your Salesforce instance. In case if you want to dynamically fetch your Salesforce instance name then use Record Lookup as shown in the following screenshot]

Find Your Instance Name
- ParentId= {!VarAccountID}
- Title= {!VarOpportunityName}
- Type= LinkPost, as shown in the below screenshot
Finally, your Flow will look like the following screenshot
4. Save your flow with name Post to Chatter Feed of Related Record and close the canvas. Don’t forget to Activate the Flow.
Launch a Flow from Process Builder
Our next task is to create a Process Builder on the Opportunity object to launch a Flow. To create a Process Builder on the Opportunity object follow the below instructions
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder
2. 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 Post to Chatter Feed of Related Record PB as name), API Name and Description as shown in the below screenshot
3. Click on Object node to add object and then select Opportunity object. For the entry criteria, Select only when a record is created, as shown in the below screenshot. Once you’re done, click on the Save button
4. The next task is to add Process Criteria. To do this click on Add Criteria, enter Name, Type of action and set filter conditions as shown in the following screenshot.
- [Opportunity].AccountId Is null Boolean False
- [Opportunity].Amount Greater than or equal Currency $100,000.00
5. The next step is to add an Immediate action to Process. Click on Add Action (Under Immediate actions), Select the type of action to create (In our case Flows), and then fill out the fields to define the action, as shown in the following screenshot
6. Once you are done, click on the Save button, it will redirect you to Process canvas. Finally, the Process will look like the following screenshot
Don’t forget to active the Process by clicking on the Activate button.
It’s time to test the Flow and Process
1) Navigate to the Opportunity tab, create a new Opportunity with an amount 200k and link it to an existing account
2) Now navigate to the Account tab, then open the account that is linked to the Opportunity, which was created in the Previous step. It will look like the following screenshot
Note: – I will suggest you to implement this first on your developer org, test it and then move it to production.