Giter Site home page Giter Site logo

intercom-discord's Introduction

Intercom notifications for Discord

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:

Intercom Bot in action

How to set up Intercom

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 Intercom Developer 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. Choose Internal integration and create the app
  • Under Webhooks tab, set Your 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 and Client secret under the Basic information tab
  • If you want to make any changes in the future, you can visit the Developer hub and click on your App.

How to set up Discord

  • 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

How to get the server running

  • 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, run yarn)
  • 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

How to configure the server

  • copy the contents of settings.json.example located at the directory root into a settings.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 directory
  • server -> url configure the path your server listens. It's the same used for intercom's webhook configuration. For example, if you used http://domain.com/webhook/123 in Intercom, you need to set /webhook/123 here
  • intercom -> hub_secret the secret key used for notification signing. It match much that in Intercom's webhook configuration
  • discord -> webhook the webhook url discord provided. You can always find it in Discord at Server Settings -> Webhooks -> Edit -> webhook url
  • enablePingNotifications: enable or disable ping 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

Receiving notifications

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.

intercom-discord's People

Contributors

themetalfleece avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.