Building an Automated Customer Sentiment Analysis Pipeline with Make and OpenAI: Real-time Feedback Analysis and CRM Integration

This guide introduces how to build a real-time customer sentiment analysis pipeline to collect immediate feedback and integrate it into your CRM system to enhance customer relationships. By combining Make (formerly Integromat) and OpenAI, you can build powerful automation solutions without any coding knowledge.

1. The Challenge / Context

Today, businesses are under pressure to continuously improve customer experience. Customer feedback is crucial, but manually analyzing vast amounts of data is time-consuming and inefficient. Especially for startups or small businesses, it can be challenging to hire data scientists or invest in complex analytical tools. There is a need for an automated solution that can quickly grasp customer feedback, classify it as positive/negative, and update customer data in the CRM system based on this.

2. Deep Dive: Make & OpenAI

Make is a low-code/no-code automation platform that allows you to visually connect various applications and services to build workflows. You can implement complex automation processes with a drag-and-drop interface, without needing to code for API integrations. OpenAI provides powerful Natural Language Processing (NLP) models capable of performing various tasks such as text analysis, sentiment analysis, and text generation. Here, we will leverage OpenAI's GPT model to analyze the sentiment of customer feedback text.

3. Step-by-Step Guide / Implementation

Below is a step-by-step guide to building a customer sentiment analysis pipeline using Make and OpenAI. This pipeline collects customer feedback, analyzes its sentiment, and records the results in a CRM system.

Step 1: Create Make Account and Scenario

Sign up for Make and create a new scenario. Set the scenario name to something easily recognizable, such as "Customer Sentiment Analysis".

Step 2: Add Trigger Module (Feedback Collection)

Add a trigger module to collect feedback. Here, we assume collecting feedback using Google Sheets as an example. Select the Google Sheets module and set the "Watch rows" trigger. Choose the Google Sheet to connect and specify the columns containing feedback data.


// Google Sheets module settings example
{
  "spreadsheetId": "your_spreadsheet_id",
  "sheetName": "Feedback",
  "startRow": 2,
  "columnNames": ["Timestamp", "Customer_ID", "Feedback_Text"]
}

Step 3: Add OpenAI Module (Sentiment Analysis)

Add the OpenAI module and select the "Create Completion" action. Connect your OpenAI API key (which must be obtained from your OpenAI account). Set the Prompt to instruct it to analyze the sentiment of the feedback text. Adjust parameters such as temperature, max_tokens to get the desired results.


// OpenAI module settings example
{
  "model": "text-davinci-003",
  "prompt": "Analyze the sentiment of the following text: {{Feedback_Text}}.\nSentiment: ",
  "max_tokens": 50,
  "temperature": 0.7,
  "n": 1,
  "stop": "\n"
}

Important: It is crucial to write the Prompt accurately. Clearly specify the desired result format, such as positive, negative, or neutral. For example, you can explicitly instruct it like "Sentiment: (Positive/Negative/Neutral)".

Step 4: Add Data Transformation Module (Data Parsing)

To parse the results returned by OpenAI, add a "Text Parser" or "JSON Parser" module. Since OpenAI's results are in string format, you can extract sentiment analysis results using regular expressions. For example, if the result is returned in the format "Sentiment: (Positive/Negative/Neutral)", you can extract "Positive", "Negative", "Neutral" values using a regular expression.


// Text Parser module settings example (regular expression)
{
  "text": "{{ OpenAI.choices[0].text }}",
  "regex": "Sentiment: (Positive|Negative|Neutral)"
}

Step 5: Add CRM Module (Data Update)

Add the module for your CRM system (e.g., HubSpot, Salesforce, Pipedrive). Select "Update Contact" or a similar action. Use the customer ID to find existing customer records and save the sentiment analysis result to a new field (e.g., "Sentiment"). If necessary, update customer record attributes (e.g., "Customer Satisfaction") based on the customer's sentiment.


// HubSpot module settings example
{
  "objectType": "contacts",
  "idProperty": "Customer_ID",
  "properties": {
    "sentiment": "{{ Text Parser.matched[1] }}"
  }
}

Step 6: Add Error Handling Module

Add an error handling module to prepare for cases where the pipeline does not work as expected. You can set up email notifications or configure it to log errors.

Step 7: Test and Activate Scenario

Test the scenario to ensure all modules are working correctly. Once testing is complete, activate the scenario. Now, whenever new feedback is collected, sentiment analysis will be performed automatically, and the CRM system will be updated.

4. Real-world Use Case / Example

A startup operating an online education platform built this pipeline to automatically analyze student feedback on lectures. Previously, reading and classifying all feedback manually was time-consuming. After building this pipeline, they saved over 10 hours per week and were able to quickly identify student complaints to improve lecture content. In particular, they provided immediate individual support to students showing negative sentiment, significantly improving customer satisfaction.

5. Pros & Cons / Critical Analysis

  • Pros:
    • Time and cost savings through automated sentiment analysis
    • Faster response possible with real-time feedback analysis
    • Improved customer relationship management efficiency through CRM integration
    • No coding knowledge required with a low-code/no-code environment
  • Cons:
    • Costs incurred based on OpenAI API usage
    • Importance of Prompt engineering: Prompt optimization required for accurate results
    • Need to consider data security and privacy issues (especially when handling sensitive customer information)
    • Imperfect accuracy of OpenAI models: Possibility of false positives (manual review needed)

6. FAQ

  • Q: How do I get an OpenAI API key?
    A: You can sign up on the OpenAI website (platform.openai.com) and obtain an API key. The obtained API key can then be entered into Make's OpenAI module.
  • Q: Can I build this pipeline with Make's free plan?
    A: Make's free plan offers a limited number of operations, so you may need to upgrade to a paid plan to use this pipeline continuously.
  • Q: How should I optimize the Prompt?
    A: The Prompt plays a role in clearly instructing the sentiment analysis model on the desired results. Experiment with various Prompts and choose the one that increases the accuracy of the results. It is recommended to provide specific instructions, examples, and desired output formats.
  • Q: Can I store data in systems other than CRM?
    A: Yes, Make supports various applications and services, so you can store sentiment analysis results in different systems such as databases, spreadsheets, and data warehouses.

7. Conclusion

The automated customer sentiment analysis pipeline using Make and OpenAI is a powerful solution for effectively analyzing and utilizing customer feedback. It saves time and costs, improves customer relationships, and supports data-driven decision-making. Follow this guide today to build your pipeline and revolutionize the customer experience. Visit the Make website now to create a free account and get started!