?>

Twilio + Facebook Messenger Integrations

Appy Pie Connect allows you to automate multiple workflows between Twilio and Facebook Messenger

  • No code
  • No Credit Card
  • Lightning Fast Setup
About Twilio

Twilio is the communciton platform that millions of developers trust to build seamless communications experiences with phone calls, text messages, video calls, and more.

About Facebook Messenger

Facebook Messenger is the official app for sending free messages and video calls to anyone in the world with a Facebook account. Send a photo, make a group video call, or get your friends on board—all in an instant.

Facebook Messenger Integrations
Facebook Messenger Alternatives

Looking for the Facebook Messenger Alternatives? Here is the list of top Facebook Messenger Alternatives

  • Intercom Intercom

Best ways to Integrate Twilio + Facebook Messenger

  • Twilio Facebook Messenger

    Twilio + Facebook Messenger

    Send Message in Facebook Messenger when New Recording is created in Twilio Read More...
    Close
    When this happens...
    Twilio New Recording
     
    Then do this...
    Facebook Messenger Send Message
  • Twilio Facebook Messenger

    Twilio + Facebook Messenger

    Send Message in Facebook Messenger when New Call is created in Twilio Read More...
    Close
    When this happens...
    Twilio New Call
     
    Then do this...
    Facebook Messenger Send Message
  • Twilio Facebook Messenger

    Twilio + Facebook Messenger

    Send Message in Facebook Messenger when New SMS is created in Twilio Read More...
    Close
    When this happens...
    Twilio New SMS
     
    Then do this...
    Facebook Messenger Send Message
  • Twilio Twilio

    Facebook Messenger + Twilio

    Send SMS in Twilio when New Message sent to Page is created in Facebook Messenger Read More...
    Close
    When this happens...
    Twilio New Message sent to Page
     
    Then do this...
    Twilio Send SMS
  • Twilio Twilio

    Facebook Messenger + Twilio

    Call Phone in Twilio when New Message sent to Page is created in Facebook Messenger Read More...
    Close
    When this happens...
    Twilio New Message sent to Page
     
    Then do this...
    Twilio Call Phone
  • Twilio {{item.actionAppName}}

    Twilio + {{item.actionAppName}}

    {{item.message}} Read More...
    Close
    When this happens...
    {{item.triggerAppName}} {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppName}} {{item.actionTitle}}
Connect Twilio + Facebook Messenger in easier way

It's easy to connect Twilio + Facebook Messenger without coding knowledge. Start creating your own business flow.

    Triggers
  • New Call

    Triggers once a call is completed on your Twilio number.

  • New Recording

    Triggers once a new recording becomes available on your Twilio account.

  • New SMS

    Triggers the moment an SMS is sent to your Twilio Number.

  • New Delivered Message

    Triggers when a new Message is sent to a page.

  • New Message

    Triggers when a new Message is sent to a page.

  • New Message Read

    Triggers when a new Message is sent to a page.

  • New Message sent to Page

    Triggers when a new Message is sent to a page.

    Actions
  • Call Phone

    Call a number or numbers and say your predefined message.

  • Send SMS

    Send a SMS to a number or numbers.

  • Send Message

    Send message from facebook page.

How Twilio & Facebook Messenger Integrations Work

  1. Step 1: Choose Twilio as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Facebook Messenger as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from Twilio to Facebook Messenger.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of Twilio and Facebook Messenger

Twilio?

Twilio provides APIs (application programming interface. that allow developers to build powerful communication experiences including sending and receiving text messages, making and receiving phone calls, and interacting with voicemail.

Facebook Messenger?

Facebook Messenger is a messaging app and it allows users to send messages but also make voice and video calls. It is one of the most popular apps in the world with over 1.3 billion monthly active users.

Integration of Twilio and Facebook Messenger

The purpose is to integrate Twilio and Facebook Messenger to create an application that can send text messages to Facebook users who are not registered on the website. The integration will provide an easy way to contact Facebook users without adding them as friends.

Firstly, you will need to register as a developer on Facebook app dashboard. You will need to set up your app and get a client ID and secret from the dashboard. These values will be used when you create your application. Next, you will need to set up an account with Twilio and get your Twilio credentials. The credentials that you will need to get are your Account SID and Auth Token. These two values will be used when configuring your application on Facebook messenger. Finally, you will need to create an application on the TwiML Bins dashboard. The URL of this application will be used when configuring your application on Facebook messenger. Once all three of these steps have been completed, you can now add a new application on the Messenger dashboard from the App Dashboard section of the messenger website. Go to Settings > Basic > Webhooks > Add Webhook. A webhook is a way for a program to receive push notifications from Facebook about events occurring in its account. More information on webhooks can be found here. You will need to fill out the fplowing input boxes. Callback URL . https://api.twilio.com/2010-04-01/Accounts/<Your Twilio Account SID>/Messages/<Message ID>.json , You will use your twilio account sid as the Callback URL. If there are any spaces in your twilio account sid, then replace them with %20 . For example, if the twilio account sid was abcdefg123xyz , then you would put abc%20def%20g123xyz . This URL will be used by Twilio to communicate with your application and get relevant information about the message that was received from Facebook messenger. Message Filtering . Filter by data sent from Facebook messenger. Use query string parameters from HTTP headers sent from Facebook messenger. From the two options above, choose the option that best suits your needs because they both do essentially the same thing. You might want to choose option 2 if you wanted to get more information about the message, such as what kind of device it was sent from or what time it was sent at. For example, if the message received from Facebook messenger was sent from a tablet, then you could use this query string parameter in your application logic to take some action based on whether or not it was sent from a tablet, such as display different content or send a different response back to Facebook than if it were sent from a mobile device. You may want to use option 1 if you wanted only the message body so that you could use it in your application logic instead of querying an API to retrieve the message body from facebook messenger. When creating this URL, make sure you include https://api.twilio.com/2010-04-01/Accounts/ in the URL so that Twilio knows where to send the message body that it receives from Facebook messenger after it has processed it using the TwiML Bin that it downloaded from your twimlbin dashboard. Request Type . POST Content-Type . application/x-www-form-urlencoded Endpoint . /2010-04-01/Accounts/<Your Twilio Account SID>/Messages/<Message ID> Make sure that you include /2010-04-01/Accounts/<Your Twilio Account SID>/Messages/<Message ID> so that Twilio knows which TwiML Bin to execute after processing the message body that it receives from Facebook messenger after it has processed it using the TwiML Bin that it downloaded from your twimlbin dashboard. Note . The request type must be POST . Make sure that you change <Message ID> with an actual value that represents an existing message in your facebook messenger account. If you don't actually have any existing messages in your facebook messenger account when testing this URL, then just go ahead and leave it as is ( <Message ID> . Text Message Contents . Enter text that you want to send back to Facebook messenger when someone sends a message via this application via Facebook messenger. This text message will be sent back to facebook messenger after being processed by the TwiML Bin that you downloaded from your twimlbin dashboard because the request type must be POST . If you feel that this value could be dangerous or spammy, then enter something harmless like "Thanks for contacting me!" . Note . The text message contents value should include the word Thanks! at the end because otherwise, users will see an error message saying "There was an error sending your message." because your webhook wasn't able to handle responding to their message correctly due to a missing keyword or character in their message body. It is recommended that you also check out. https://developers.facebook.com/docs/messenger-platform/webhooks/messages#preview_the_payload_your_webhook_will_receive_when_a_message_is_sent_to_an_app and https://developers.facebook.com/docs/messenger-platform/webhooks/#quickstart for more information on webhooks for facebook messenger applications. Click Save Changes . Your webhook is now set up and ready to start receiving messages! Now you can configure your Messenger application on Facebook messenger by going into Settings > Basic > Webhooks > Edit . The Callback URL field should contain the URL that we created earlier for our webhook (https://api.twilio.com/2010-04-01/Accounts/<Your Twilio Account SID>/Messages/<Message ID>.json. Now click Save Changes . Test your webhook by going into Settings > Basic > Webhooks > Preview Messages > Send test payload . A new window should pop up with a text box where you can type in test text messages to send through your webhook (make sure Notifications are turned on for your app. Click Send test payload . You should see a notification appear at the top of this page saying "Message sent successfully." indicating that your webhook functioned properly and received the test message sent from facebook messenger's test payload window after being processed by your TwiML Bin which was downloaded from your twimlbin dashboard because the request type must be POST . Congratulations! Your webhook is now configured and ready to receive messages from facebook messenger! Now all we have left is to create a new application on facebook messenger by going into Settings > Basic > Webhooks > Add Webhook . The Callback URL field should contain the URL that we created earlier for our webhook (https://api.twilio.com/2010-04-01/Accounts/<Your Twilio Account SID>/Messages/<Message ID>.json. Now click Save Changes . Test your webhook by going into Settings > Basic > Webhooks > Preview Messages > Send test payload . A new window should pop up with a text box where you can type in test text messages to send through your webhook (make sure Notifications are turned on for your app. Click Send test payload . You should see a notification appear at the top of this page saying "Message sent successfully." indicating that your webhook functioned properly and received the test message sent from facebook messenger's test payload window after being processed by your TwiML Bin which was downloaded from your twimlbin dashboard because the request type must be POST . Congratulations! Your webhook is now configured and ready to receive messages from facebook messenger! Now all we have left is to create a new application on facebook messenger by going into Settings > Basic > Webhooks > Add Webhook . The Callback URL field should contain the URL that we created earlier for our webhook (https://api.twilio.com/2010-04-01/Accounts/<Your Twilio Account SID>/Mess

The process to integrate Twilio and Facebook Messenger may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.