|

|  How to Integrate Amazon AI with Intercom

How to Integrate Amazon AI with Intercom

January 24, 2025

Learn to seamlessly integrate Amazon AI with Intercom, enhancing customer interactions with advanced AI features in this step-by-step guide.

How to Connect Amazon AI to Intercom: a Simple Guide

 

Set Up AWS Account and Services

 

  • Sign into your AWS Management Console. If you don't have an account, [create one](https://aws.amazon.com/) following the given instructions.
  •  

  • Navigate to the **AWS Services** section and select **AI and Machine Learning**.
  •  

  • Choose the specific Amazon AI services you plan to integrate with Intercom, such as Amazon Lex for building conversational interfaces or Amazon Polly for converting text into realistic speech.
  •  

  • Ensure you have the necessary permissions and access keys by navigating to **Identity and Access Management (IAM)**. Create a new IAM user and download the access key and secret key. Store these securely.

 

Build the Amazon AI Service Logic

 

  • Develop the core logic for your chosen Amazon AI service. For example, if you're using Amazon Lex, design your chatbot with intents and slots.
  •  

  • Define your endpoints that will communicate with your AI service. Ensure they can handle incoming requests from Intercom's setup. AWS SDKs (e.g., Boto3 for Python) may be used for this integration.
  •  

    import boto3
    
    client = boto3.client('lex-runtime',
                          aws_access_key_id='YOUR_ACCESS_KEY',
                          aws_secret_access_key='YOUR_SECRET_KEY',
                          region_name='YOUR_REGION')
    
    response = client.post_text(
        botName='YOUR_BOT_NAME',
        botAlias='YOUR_BOT_ALIAS',
        userId='USER_ID',
        inputText='Text from Intercom'
    )
    
    print(response['message'])
    

     

 

Set Up Intercom

 

  • Log in to your Intercom account. If you don't have an account, [create one](https://www.intercom.com/) by following their onboarding process.
  •  

  • Go to the **Settings** section and access the API Keys. Generate a new API key if needed and take note of it.
  •  

  • Decide the specific integration points in Intercom, such as messenger conversation, help articles, or custom bots.

 

Develop a Middleware for Integration

 

  • Create a server that will act as middleware to manage data transfer between Intercom and AWS services. Languages like Node.js, Python, or Ruby on Rails are suitable for building this middleware.
  •  

  • Set up your server to handle POST requests from Intercom with the contact or conversation data.
  •  

  • Use logic in your server to forward these requests to the appropriate Amazon AI service endpoint.
  •  

    const express = require('express');
    const app = express();
    const bodyParser = require('body-parser');
    const AWS = require('aws-sdk');
    
    AWS.config.update({
      accessKeyId: 'YOUR_ACCESS_KEY',
      secretAccessKey: 'YOUR_SECRET_ACCESS_KEY',
      region: 'YOUR_REGION'
    });
    
    const lexRuntime = new AWS.LexRuntime();
    
    app.use(bodyParser.json());
    
    app.post('/intercom-webhook', (req, res) => {
      const params = {
        botName: 'YOUR_BOT_NAME',
        botAlias: 'YOUR_BOT_ALIAS',
        userId: req.body.user_id,
        inputText: req.body.message_text
      };
    
      lexRuntime.postText(params, (err, data) => {
        if (err) {
          console.log(err, err.stack);
          res.status(500).send(err);
        } else {
          res.send(data.message);
        }
      });
    });
    
    app.listen(3000, () => {
      console.log('Server running on port 3000');
    });
    

     

 

Create an Intercom Webhook

 

  • In your Intercom developer hub, set up a webhook to trigger when specific events occur, like when a new conversation starts or a user sends a message.
  •  

  • Point the webhook to the endpoint you've created within your middleware to initiate the requests to Amazon AI.
  •  

  • Test the webhook functionality with sample data to validate the integration is working as expected.

 

Deploy and Test the Integration

 

  • Deploy your middleware to a cloud platform like AWS (using Elastic Beanstalk, Lambda, etc.) or a traditional web server.
  •  

  • Test thoroughly with real user interactions in the Intercom chat. Ensure that the responses from Amazon AI services return correctly and are appropriately displayed in Intercom.

 

Monitor and Maintain the Integration

 

  • Regularly check logs and analyze the data flow between Intercom and AWS to ensure everything works smoothly.
  •  

  • Implement enhancements and solve any bugs that might arise from the interaction between the services.

 

Omi Necklace

The #1 Open Source AI necklace: Experiment with how you capture and manage conversations.

Build and test with your own Omi.

How to Use Amazon AI with Intercom: Usecases

 

Leveraging Amazon AI with Intercom for Enhanced Customer Support

 

  • Identify and categorize customer inquiries using Amazon AI's machine learning algorithms to analyze text data. This can help in automatically tagging and routing queries to the appropriate team.
  •  

  • Utilize Amazon Transcribe to convert voice messages from customers into text, integrating seamlessly with Intercom for more accessible analysis and response.
  •  

  • Enhance customer interaction via Amazon Lex by incorporating conversational bots within Intercom for handling common queries, freeing up customer support agents for more complex issues.
  •  

  • Integrate Amazon Personalize to offer customers personalized responses or recommendations based on previous interactions, which Intercom can deploy directly within their messaging platform.
  •  

  • Implement sentiment analysis using Amazon Comprehend, allowing Intercom to prioritize and respond to messages based on detected customer satisfaction levels.
  •  

 


npm install @aws-sdk/client-comprehend @intercom/intercom-client

 

 

Creating a Smart CRM System with Amazon AI and Intercom

 

  • Empower your CRM by using Amazon Rekognition to analyze customer-uploaded images, enhancing data attached to user profiles in Intercom with visual recognition insights.
  •  

  • Deploy Amazon Polly to convert text-based analytics from Intercom into speech, creating podcasts for training purposes or auditory data translations for visually impaired teams.
  •  

  • Utilize Amazon Forecast to predict trends in customer behavior based on interaction data collected through Intercom, enabling proactive engagement strategies.
  •  

  • Enhance bot functionalities by using Amazon Translate within Intercom chat, allowing communication in multiple languages and expanding global customer support capabilities.
  •  

  • Use Amazon Kendra to create a knowledge base that integrates with Intercom's help systems, offering robust and intelligent search functionalities for customer queries and support documents.
  •  

 


npm install @aws-sdk/client-translate @intercom/intercom-client

 

Omi App

Fully Open-Source AI wearable app: build and use reminders, meeting summaries, task suggestions and more. All in one simple app.

Github →

OMI NECKLACE + OMI APP
First & only open-source AI wearable platform

a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded
a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded
online meeting with AI Wearable, showcasing how it works and helps online meeting with AI Wearable, showcasing how it works and helps
online meeting with AI Wearable, showcasing how it works and helps online meeting with AI Wearable, showcasing how it works and helps
App for Friend AI Necklace, showing notes and topics AI Necklace recorded App for Friend AI Necklace, showing notes and topics AI Necklace recorded
App for Friend AI Necklace, showing notes and topics AI Necklace recorded App for Friend AI Necklace, showing notes and topics AI Necklace recorded