This project describes how to integrate Coveo within Slack to create a search (chat)bot. It uses multiple components: Coveo, Heroku, Slack, API.ai.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
misc
README.md

README.md

Coveo integration with Slack

This project describes how to integrate Coveo within Slack to create a search (chat) bot.

It uses multiple components:

  • Coveo platform - hosts the index and organization for your data, provides the search capabilities.
  • Heroku - hosts the webhook API.ai will send the intents to and queries Coveo.
  • Slack - the application users will use to interact with Coveo. It will be like doing a conversation with a user in Slack.
  • API.ai - Process the queries from Slack and translate them to Intents.

How it works

In Slack, users send queries to user @coveo like @coveo search for JavaScript framework. Or they can have direct messages with @coveo. Slack will send the message to API.ai which will transform it to an User Intent. API.ai sends the Intent to the Heroky app which will send a query to Coveo based on the keywords in the intent. The results are returned to Slack.

How to build

Coveo

  1. In your Coveo organization, create a hosted search page to show more results from Slack.

Heroku

  1. Set up a new project in Heroku

    • Add the files from misc/heroku in your Heroku environment.
    • Add config variable COVEO_API_KEY with your Coveo API key.
    • Add config variable COVEO_SEARCH_PAGE with the url to the Search Page for the results link in Slack.
    • Start your app in Heroku
  2. Set up your COVEO_API_KEY as a config variable in your Heroku app

  3. Start your app in Heroku a. create a new Heroku app b. wait for the app status' to be "ready"

  4. In API.ai, create an agent and follow the procedure in API.ai's Slack Integration.

API.ai

  1. In API.ai console, create a new agent.
  2. You can import the file misc/api.ai/agent.config.zip to reproduce our intents.
  3. Go in Fulfillment and update the URL to your Heroku app.
  4. Go in Integration and enable Slack. Follow the instructions to connection to your Slack app.

Slack

  1. You need to create a new App. Follow the instructions at https://api.slack.com/apps?new_app=1

How to run

Once you've completed your Slack integration, you can send direct messages to your new bot in Slack. You can send messages like find images with dinosaurs.

Dependencies

  • You will need a Coveo organization and an Api key (restricted to Search only).
  • Heroku, this application is hosted in Heroku.
  • API.ai, this application uses services from API.ai, you can register for a free account.
  • Slack, we are creating a slack bot, so you need Slack ;o)

References

Authors