Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Creating Chatter Notifications from Inbound Messages

Before you start, be sure that you've completed the following requirements:

In this section of the package, we'll learn how to create a chatter notification when we receive an inbound message.

Step 1: Create a New Process Builder Flow

In your setup home page, go to the left navbar and click on Process Automation > Process Builder.

Process Builder.png

On the "My processes" page, click on "New" in the top right corner.

New Process.png

In the new process modal, enter the following information:

  • Process Name: SMS Chatter Notification (or custom name)
  • API Name: SMS_Chatter_Notification (press tab to auto-populate)
  • Description: Creates a chatter notification on inbound SMS. (optional)
  • The process starts when: Select "A record changes"

Process Details.png

Step 2: Set up the Process Trigger

Now that you've created your process builder flow, we can configure it to create the chatter notification. Start by clicking on "Add Object". Then search for "Twilio" in the object finder and select "Twilio Message" as the object to trigger on.

Process Trigger.png

Then, under "Start the process" make sure that you've selected "only when a record is created".

Record Created.png

Step 3: Define the Process Criteria

Now that we have our trigger set up, we need to configure out process so that 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 with the heading "Define Criteria for this Action Group" appear.

Specify the following values:

  • Criteria Name: Create From Event
  • Criteria for Executing Actions: Conditions are met
  • Set conditions:
    • Field: Choose "Created from platform event"
    • Operator: Equals
    • Type: Boolean
    • Value: True


Once you've specified those conditions, click the blue "Save" button at the bottom of the panel.

Step 4: Specifying Your Action

Now that we have a trigger and criteria set up so that our process will only execute actions for an inbound message, we can trigger different types of events within Salesforce such as email or chatter. For our example, we'll post to a chatter group.

First, click on "Add action" in the immediate actions box. Then, specify the following values in the side-panel that appears:

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}

Chatter Action.png

Step 5: Activate Your Action and Test!

Click on the blue "Activate" button in the top-right corner of the process builder window. Then, try texting in to your Salesforce instance. You should see new messages arriving in your chatter group when you text in.

Chatter Post.png2

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.