Skip to content

Repository files navigation

Intercom2DW Build Status

Intercom2DW is an attempt at loading all the data available in an Intercom application.

Why?

Intercom is great, really, but it lacks advanced analytics capabilities. We wanted to be able to analyze the data we have in an advanced manner so we built Intercom2DW: a simple application that will load all your data into a data warehouse connected to Metabase to let you build the queries you want and need.

Test it

The repository contains a docker-compose configuration file that will let you start everything you need: a PostgreSQL database, a Metabase instance and the Intercom2DW container. Here is how:

docker-compose up -d
docker-compose run intercom2dw bash

You will now have a prompt from the Intercom2DW container. From here you can start loading your data:

node /src/index.js --help

Deploy

You will find a docker-compose-prod.yml template that you can use to deploy Intercom2DW and its database to any Docker host.

Copy this file, tweak it and start the service to see your data going from the API to your database.

Configuration

You'll be able to tweak Intercom2DW using several environment variables. Here they are:

VariableDefaultDescription
INTERCOM2DW_APP_IDYour Intercom application ID only if you are using api key authentication.
INTERCOM2DW_APP_TOKENYour Intercom api key or your access token.
INTERCOM2DW_API_URLhttps://api.intercom.ioThe URL to use to reach the Intercom API.
INTERCOM2DW_DB_HOSTdbThe host name to use to connect to the PostgreSQL database.
INTERCOM2DW_DB_PORT5432The TCP port to use to connect to the PostgreSQL database.
INTERCOM2DW_DB_USERintercom2dwThe username to use to connect to the PostgreSQL database.
INTERCOM2DW_DB_PASSWORDintercom2dwThe password to use to connect to the PostgreSQL database.
INTERCOM2DW_DB_NAMEintercom2dwThe database name to use to connect to the PostgreSQL database.
INTERCOM2DW_CRON0 */12 * * *The cron expression used to schedule the full loading process (including events).
INTERCOM2DW_EVENTS_CRONThe cron expression used to schedule the loading of events only.

Caveats

The Intercom API is not meant to be used as a datasource for such an application. To be honest, an API is not really the best thing to use when it comes to loading data.

We sent some kind of RFC to the Intercom team. We are now wainting to see if they can and want to implement such things to help us do what we want. Because they might already be busy building an awesome product we don't expect them to implement everything we need so we worked with them to ensure our tool won't make you blacklisted on their backend.

Intercom2DW actually works but it sends a pretty high number of HTTP requests to the API. It does so with respect to the rate limit and other things that are enforced by Intercom but it will for sure send many many many HTTP requests and take a while depending on the amount of data you will have to load.

Be kind, and if you try Intercom2DW, try to launch the application only once in a week or something like that. Or get in touch with the Intercom team to let them know what you are doing.

License

This project is released under the MIT license.

About

Intercom2DW is an attempt at loading all the data available in an Intercom application.

Topics

Resources

Stars

3 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages