Skip to main content

Notifications

Category classification (analyze and categorize feedback from your customers) with GPT

plarrue Profile Picture Posted by plarrue

Sharing this instant cloud flow on how to analyze and categorize feedback from your customers using AI Builder GPT capability.

  

Navigate to Power Automate 

On the left pane, select + Create

Select Instant cloud flow

Give a Flow name

Select Manually trigger a flow

Select Create

Select the action Manually trigger a flow > Select + Add an input > Select File

 

choose-the-type-of-user-input.png

 

 

Select + New step

Select Create text with GPT (preview)

Select Create prompt

Select Start from blank

 

create-prompt-start-from-blank.png

 

 

Type this prompt text that you want the model to create.

 

Summarize the following customer feedback in one sentence and categorize them into the following categories: "food", "service", "cleanliness" and "ambiance".  

  

Detect positive or negative sentiment in the text into the following emojis: "🙂", "🙁". 

  

Additionally, generate a creative and positive tone response while maintaining humility. 

  

Return the data in a JSON format with the category in a separate columns `feedback`, `sentiment`, `category` and `response`. 

  

[Start of text] 

"I was excited to try this restaurant based on recommendations, but it fell short of expectations. The wait time for a table was excessive, and the reservation process seemed disorganized. Once seated, the ambiance was underwhelming, and the overall service was slow and unresponsive. It was not the enjoyable dining experience I had hoped for." 

  

"The dining experience at this restaurant was marred by poor hygiene practices. The tables were dirty, and the utensils had food remnants stuck to them. It was clear that the restaurant lacked proper cleanliness and attention to detail. This significantly affected our enjoyment of the meal and raised concerns about the overall hygiene standards." 

  

"I had high hopes for the menu variety at this restaurant, but it was disappointingly limited. The options were limited to only a few basic dishes, and there was a lack of creativity or unique offerings. It left me wanting more variety and excitement in the culinary selection." 

  

"I recently had the pleasure of dining at this incredible restaurant, and I must say it was an unforgettable experience! From the moment I stepped in, the ambiance was warm and inviting, setting the perfect tone for the evening." 

[End of text]

 

Select Test it out

 

describe-the-text-the-model-should-create.png

 

 

👉 Copy and keep the Response somewhere , we will need it for a next step to build our JSON schema.

 

response.png

 

Response

[ 

  { 

    "feedback": "The wait time for a table was excessive, and the reservation process seemed disorganized. Once seated, the ambiance was underwhelming, and the overall service was slow and unresponsive.", 

    "sentiment": "🙁", 

    "category": "service", 

    "response": "We apologize for the inconvenience caused by the wait time and disorganization. We strive to provide the best service and ambiance for our customers and we will work hard to ensure that this does not happen again." 

  }, 

  { 

    "feedback": "The tables were dirty, and the utensils had food remnants stuck to them. It was clear that the restaurant lacked proper cleanliness and attention to detail.", 

    "sentiment": "🙁", 

    "category": "cleanliness", 

    "response": "We apologize for the lack of cleanliness and attention to detail. We take pride in providing a clean and hygienic environment for our customers and we will take steps to ensure that this does not happen again." 

  }, 

  { 

    "feedback": "The options were limited to only a few basic dishes, and there was a lack of creativity or unique offerings.", 

    "sentiment": "🙁", 

    "category": "food", 

    "response": "We apologize for the lack of variety and creativity in our menu. We strive to provide a unique and exciting culinary experience for our customers and we will work hard to ensure that this does not happen again." 

  }, 

  { 

    "feedback": "From the moment I stepped in, the ambiance was warm and inviting, setting the perfect tone for the evening.", 

    "sentiment": "🙂", 

    "category": "ambiance", 

    "response": "We are delighted to hear that you enjoyed the ambiance of our restaurant. We strive to provide a warm and inviting atmosphere for our customers and we are glad that we could do that for you." 

  } 

] 

 

Select Use prompt in a flow 

 

use-prompt-in-a-flow.png

 

 

In the prompt, between [Start of text] [End of text]

Replace the text with file content from the dynamic content list.

 

start-end-file-content.png

 

Select + New step

Select Parse JSON

 

In Content , select Text from the dynamic content list.

 

content-parse-json.png 

 

 Select Generate from sample
👉 Paste
the Response in Insert a sample JSON Payload
Select Done
Select Save

 

insert-sample-json-payload.png

  

You should have something like this.

  parse-json-schema.png

 

 

At this stage, you should be able to test your flow and observe the output.

 

You should have something similar to this.

 

 json-output.png

 

 

Excel Online (Business)

 

If you want to save the output in an Excel document, let’s continue!

 

Prerequisite

 

Select + New step

Select Add a row into a table

In Location, Select OneDrive for Business
In Document Library, Select OneDrive
In File, Select your Excel File
In Table, Select your Table
In Feedback, Select feedback from the Dynamic content list
In Sentiment, Select sentiment from the Dynamic content list
In Category, Select category from the Dynamic content list
In Response, Select response from the Dynamic content list

 

(The Apply to each should be added automatically)

 

add-a-row-into-a-table.png

  

 

You should have something similar to this.

 

 

add-a-row-into-a-table-2.png

  

 

Select Save and Select Test.

Data should be automatically added to the Excel Table.

 

🔎 Let’s check the result!

   

🎉Congratulations, you have successfully created a flow with a GPT action.

 

📌 AI-generated content can have mistakes. Make sure it's accurate and appropriate before using it.

 

 

excel-output.png

 

Categories:

AI Builder

Comments