Import all data from an Intercom app into a MongoDB deployment.
Last updated 3 years ago by durran .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install intercom-to-mongodb 
SYNC missed versions from official npm registry.

intercom-to-mongodb travis npm

Import all data from an Intercom app into a MongoDB deployment


npm install -g intercom-to-mongodb


Create a .env file:

> intercom-to-mongodb --help
Usage: intercom-to-mongodb [options] [command]


  users           import all user data
  tags            import data for all tags
  segments        import data for all segments
  conversations   import data for all conversations
  admins          import data for all admins
  events          import all event data


  -h, --help              output usage information
  -V, --version           output the version number

Import all users

# Also imports all tags, segments, conversations, admins.
DEBUG=* intercom-to-mongodb users;

Import all events

# Must have users imported first.  Have to iterate through user ids and
# fetch event streams individually.  Takes a really long time. Just hit
# ctrl+c to kill it when you have enough data.
DEBUG=* intercom-to-mongodb events;

If you used mongodb://localhost:27017/intercom as MONGODB_URL in your .env file:

> mongo 'mongodb://localhost:27017/intercom'
show collections


  • [x] Initial get of 10k users from Intercom API
  • [x] Initial get of all admins from Intercom API
  • [x] Initial get of all tags from Intercom API
  • [x] Initial get of all segments from Intercom API
  • [x] Initial get of all conversations from Intercom API
  • [x] Use the Scroll API to get all users
  • [x] Reshape user location shape and db.users.createIndex( { "coordinates": "2dsphere" } )
  • [x] Cast user *_at epoch time fields from Intercom API as ISODate
  • [x] $lookup to inline user.tags from
  • [x] $lookup to inline user.segments from tags.segments
  • [x] Get all events for all users
  • [ ] Support incremental resync from Intercom API
  • [ ] For each conversation, get the full conversation from API which has conversations_parts populated. Once completed, the conversation document will be interesting, metadata alone
  • [ ] Sentiment analysis on conversations_parts contents, e.g.


Apache 2.0

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

3 Versions

  • 1.0.0                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago

Copyright 2014 - 2016 © |