Rate this page:

Create 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 Salesforce Chatter notification when we receive an inbound message.

Create a New Process Builder Flow

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

Create a new Process Builder flow

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

Add a new Process

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"

New Process for SMS Chatter notifications with Twilio for Salesforce

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". 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":

Start a process only when the record is created

Define the Process Criteria

Now that we have our trigger set up, we need to configure out 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 with the heading "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: Equals
    • Type: Picklist
    • Value: Inbound

Twilio Incoming Message Check

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

Specify 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 this example, we'll post to the chatter

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}

Post Twilio SMS to a Chatter group in Salesforce

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.

Activate your SMS Action

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: "User"
  • User: "Select a User from the Record"
  • In the Search box: [TwilioSF__Message__c].Owner:User.Id
Rate this page:

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 by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.


        Thank you for your feedback!

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

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more