This app listens to events from Intercom and posts them to Discord (using Intercom and Discord webhooks)
For example, whenever a user replies to a conversation, the following will be posted as soon as it happens:
Webhooks for workspaces in 'Settings' -> 'Developers' -> 'Webhooks' have been deprecated. New webhooks must now be managed through apps, as explained below.
- Open
Your apps
page in IntercomDeveloper Hub
by clicking on your Avatar ->Settings
->Developers
->Developer Hub
- Click
New app
- Name your app, and select which
workspace
you want the Discord integration to added to. ChooseInternal integration
and create the app - Under
Webhooks
tab, setYour request endpoint URL
to the url your server will use. You can use something complex for security, but the notifications will be signed anyway. Example:http://domain.com/webhook/123
- Under
Webhook topics
, select which topics you would like to receive notifications for - You can find the
Client id
andClient secret
under theBasic information
tab - If you want to make any changes in the future, you can visit the
Developer hub
and click on your App.
- on your Discord server's settings, go to Webhooks
- click on Create Webhook
- customize it as you want, by setting a picture and display name. Those will be used for the discord messages
- select the channel in which the messages will be posted
- note the webhook url
- clone this repo -
git clone https://github.com/themetalfleece/intercom-discord
- install node.js (minimum and suggested: 8.11.1, version 10 is not tested)
- install the pm2 process manager - run
npm install pm2 -g
- navigate to the project's directory and run
npm install
(or, if you're using yarn, runyarn
) - configure your server (look below)
- run the app - run
pm2 start app.js
. You can now close the console as it runs in the background - for autorun on system startup, refer here
- copy the contents of
settings.json.example
located at the directory root into asettings.json
file and edit it server -> http and server -> https
configure if you want to use http/https and the ports to be used. For https, you also need to provide the path to the certificates relative to the project's directoryserver -> url
configure the path your server listens. It's the same used for intercom's webhook configuration. For example, if you usedhttp://domain.com/webhook/123
in Intercom, you need to set/webhook/123
hereintercom -> hub_secret
the secret key used for notification signing. It match much that in Intercom's webhook configurationdiscord -> webhook
thewebhook url
discord provided. You can always find it in Discord atServer Settings -> Webhooks -> Edit -> webhook url
enablePingNotifications
: enable or disableping
events send by Intercom. I recommend you have it enabled until you make sure it works- save the file
- if the server is already running with pm2, restart the server by running
pm2 restart app
To test if it works, you can go to Intercom's Webhooks page and click on the ping
button. A message should be posted on Discord.