Harness Webhooks in Your Series to Send Survey Responses to Slack

  • 10 December 2023
  • 0 replies

Userlevel 4
Badge +5

As a Customer Support Engineer, a common question I get from customers is, “Can I send Intercom Survey results to Slack?”

The answer is a resounding “Yep”! In fact, it’s possible to do this within Intercom without having to write a single line of code. (Though a little knowledge about how APIs work never hurts 😀!)


What you’ll need to do this: 

  1. Create the Series

Create a new Series in your workspace and set up your Audience rules to filter for your intended Survey audience. In my example, I want to send a Survey to all of my customers who have signed up for my product in the last 90 days. This Survey can send on any URL that my Intercom workspace is installed on.


  1. Create and Add your Survey

I’m not going to go through all the steps of creating a Survey. If you want to learn how to set one up you can read about that here. That said, one important thing to remember to do when setting the Survey up is to sync the value of your customer’s Survey responses to a Custom People Data Attribute that you’ve created. 


In the example below, I’ve created a single-question NPS Survey that stores the User’s response to an Intercom data attribute that I created named nps_score.



If I were to set the below Series live now, a User who fit the Series’ Audience filters would enter the Series and receive the Survey when they log into my app.


  1. Send Survey results to Slack via Webhook

Once a User receives the Survey and submits it, we want to trigger a Webhook that sends a notification message to Slack with the Survey’s results.


To do this, we’ll need to use the option “When delivered and completed” for moving the user to the next node of our Series.


This will create a Rule Block in our Series which we then want to connect to a Webhook block, as shown below.



When working with 3rd party platforms like Slack, you’ll need to make sure that you are consulting their docs so you understand how their side of the setup works. You can find Slack’s API docs here. These docs will walk you through how to:

  • Create a Slack App (if you haven’t already)
  • Enable incoming Webhooks
  • Create an incoming Webhook
  • Use your Incoming Webhook to post a message

Back in Intercom, fill out your Webhook details. You’ll want to make this Webhook call using the POST method and use the Webhook URL that you generated by following along with the Slack docs, above.


You’ll need to a Content-Type header of application/json and the message that you send to Slack will be associated with the ‘text’ attribute (as dictated in Slack’s docs). 


You can dynamically add the User’s Name, nps_score, and any other user attributes by clicking on the {..} icon that appears when you hover in the value field of the Webhook Body section.



Your final Webhook will look something like the one below.



NOTE:  “Long text entry” Survey questions can’t be sent this way since they may exceed character length limitations.


  1. Test!

Once you have the Webhook set up, you can test it out by clicking on the ‘Test’ button at the top of the screen. 


Running that test will make sure that the Webhook is properly sending to your Slack channel 👇



NOTE: If the attribute that you are storing the Survey response in doesn’t have a value yet for your test User when you click on that ‘Test’ button, then no value will be sent for it in your message.


Now that you’ve confirmed the Webhook works you can test out the entire Series with a test User. You can do this by having the Series’ Audience rules target your own test User’s email address and set it live. 


Log into your app as your test User. You should receive the Survey modal. When you complete the Survey and submit it, a notification should be sent to Slack to let your team know!


You can end the Series here or, if there’s more messaging or actions that you want the Series to take, you can continue to build on to it. 👍


0 replies

Be the first to reply!