A slackbot that returns a user or lead from your intercom app. This slackbot is built using Node.js.
git clone https://github.com/damonfstr/slack-intersearch.git
There are three envoronmental variables that need to be set up to make intersearch work.
- INTERCOM_PAT = Your Intercom access token.
- token = Your Slack access token
- app_id = Your Intercom app_id
You'll need to create a bot user in your Slack team. See Slack's documentation on this here
Don't forget to invite the bot user to the channel you want the integration in!
You'll need to get an extended access token to use this bot effectively.
While listing a single user requires only a standard scope, listing leads requires extended.
I also have plans to implement Intercom's scroll api into the bot which would require an extended access token.
INTERCOM_PAT=intercom_access_token token=SLACK_API_TOKEN app_id=your_intercom_app_id node intersearch_bot.js
I would suggest deploying the bot to something like Heroku however.
After being invited into a slack channel, the bot can be interacted with the following commands:
@botname help
results in the bot responding with instructions on how to use it.@botname uptime
results in the bot responding with how long it has been online.@botname user [email_address]
results in the bot responding with a link to the user with that email address.@botname lead [email_address]
results in the bot responding with a link to all leads with that email address.@botname user [user_id]
results in the bot responding with a link to the user with that user_id.@botname user -n [name]
results in the bot responding with all users with the name specified.@botname lead -n [name]
results in the bot resonding with all leads with the name specified.@botname user -p [phone number]
results in the bot responding with all users with the phone number specified.@botname lead -p [phone number]
results in the bot responding with all leads with the phone number specified.
- You can see all my todo stuff here
- The search term is an exact match, so make sure to pass in the correct casing/formatting etc.