How to Create Chatter Notifications from Inbound Messages
Info
Before you start, be sure that you've completed the following requirements:
- Complete the instructions outlined in the previous help guide: Receive Incoming Messages in Salesforce.
- Create a Chatter group that you can post messages to. If you are unsure about how to do this, check out the Salesforce documentation on how to set up a Chatter group.
In this section of the guide, you'll learn how to create a Salesforce Chatter notification when you receive an inbound message.
In your Salesforce setup home page, go to the left-hand navbar and click on Process Automation > Process Builder :

On the My processes page, click the New button at the top right corner:

In the New Process panel, enter the following information:
- Process Name —
SMS Chatter Notification
, or a custom name. - API Name —
SMS_Chatter_Notification
. Press Tab to auto-populate this field. - Description —
Creates a Chatter notification on inbound SMS.
This is optional. - The process starts when — Select A record changes .

Now that you've created your Process Builder flow, you can configure it to create the Chatter notification.
Start by clicking on Add Object . Enter Twilio
in the Object finder and select Twilio Message as the object to trigger on:

Then, under Start the process , make sure that you've checked only when a record is created :

Now that you have your trigger set up, you need to configure the process so it only creates Chatter events when inbound messages are created.
In the diamond underneath the Twilio Message trigger, click on Add criteria . You'll see a side panel headed Define Criteria for this Action Group appear.
Specify the following values:
-
Criteria Name — Incoming SMS.
-
Criteria for Executing Actions — Conditions are met.
-
Set conditions:
- Field: Choose Direction .
- Operator: Choose Equals .
- Type: Choose Picklist .
- Value: Choose Inbound .

Once you've specified those conditions, click the blue Save button at the bottom of the panel.
Now that you have a trigger and criteria set up so that your process will only execute actions for an inbound message, you can trigger different types of events within Salesforce such as email or Chatter. For this example, we'll post to Chatter.
First, click on Add action in the Immediate Actions box. Then specify the following values in the side-panel that appears:
- Action name:
Post to Chatter
, or a custom name of your choice. - Post to: Select Chatter Group .
- Group: Select the group you wish to post to. In our example, it's SMS Notifications . Read this Salesforce documentation about setting up a Chatter group if you do not have one configured.
For the message, click on Merge field and add Number Unformatted as well as Body . You should end up with the following in your message field:
New Message from {![TwilioSF__Message__c].TwilioSF__From_Number_Unformatted__c}: {![TwilioSF__Message__c].TwilioSF__Body__c}

Click on the blue Activate button in the top-right corner of the Process Builder window. Now try texting a message to your Salesforce instance. You should see new messages arriving in your Chatter group:

Info
Alternatively, you can also post the Chatter directly to the message owner, instead of a group.
Your configuration to post a Chatter to user will be:
- Post to : Select User .
- User : Choose Select a User from the Record .
- In the Search box :
[TwilioSF__Message__c].Owner:User.Id
.