A simple rails application that serves as a webhook endpoint
Deploy to Heroku using the following steps:
- Clone this repo
cd intercom-webhooks-test
- Install the Heroku Toolbelt
heroku login
heroku create
ruby -e "require 'securerandom'; puts SecureRandom.hex(128);"
- Use this string in the next command.
heroku config:set --app YOUR-APP-NAME SECRET_TOKEN=<string from previous command output>
git push heroku master
heroku run rake db:migrate
heroku domains
- Remember this URL for later.
For more help check out how to get started with Rails 4 on Heroku.
- Create a new webhook in Intercom by heading to the Webhooks section of your Developer Home Dashboard
- In the
Webhook URL
field enter the output of theheroku domains
command from above. - In the
Hub Secret
field, enter the value of secret from this part of the code.- If you were dealing with a production app you'd want to make this a little more secure.
- This is to ensure that the webhook is coming from a verified source.
- The secret can be updated to whatever you want once it gets updated in the code in the above place.
- You can read about this in the Intercom developer docs here
- Value in Intercom.
- Choose the topics that you want to subscribe to:
- Create the webhook:
- If everything is set up correctly, visit the
heroku domains
URL and you should see a ping from Intercom like this: