Skip to content

DamonFstr/Intercom-Webhooks-Test

Repository files navigation

A simple rails application that serves as a webhook endpoint

Get it Running

Production

Deploy to Heroku using the following steps:

Create

  • 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>

Deploy

  • 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.

Use

  • Create a new webhook in Intercom by heading to the Webhooks section of your Developer Home Dashboard Create New Webhook
  • In the Webhook URL field enter the output of the heroku domains command from above.
    • Output of the heroku domains command: heroku domains
    • Value of the Webhook URL field: Webhook URL
  • 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. Secret
  • Choose the topics that you want to subscribe to: Topics
  • Create the webhook:
  • If everything is set up correctly, visit the heroku domains URL and you should see a ping from Intercom like this: Ping

About

A simple rails app to test Webhooks from Intercom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published