How to use OpenAI's ChatGPT for sentiment analysis

Learn how to use OpenAI's ChatGPT for sentiment analysis. Discover step-by-step instructions and tips to effectively analyze sentiments using ChatGPT.

OpenAI Template

There's a near-infinite amount of tasks you can solve using OpenAI. Use this template showcase to get started with +10 pre-built examples.

About Rows

Rows is the easiest way to import, transform, and share data in a spreadsheet. It combines a spreadsheet editor, +50 integrations with the tools you use every day, a powerful AI Analyst✨, and a sharing experience to instantly turn any spreadsheet into a web app, a form, or a dashboard.

Product image

Connect the OpenAI integration

To connect the integration, open a new spreadsheet, and select the OpenAI integration on the welcome side panel. Alternatively, you can search for the integration inside the Data actions panel.

Connect OpenAI

Inside the actions panel, search for "Sentiment analysis" and select the action.

Sentiment Analysis action

Finally, Connect the integration to get started.

The Free plan includes 20 free uses of the OpenAI integration. Users on the Plus or Pro plans have unlimited access to OpenAI and can use their API key to access any OpenAI model, including fined-tuned models. By default, the OpenAI integrations use the "gpt-4o" model.

Use the Sentiment Analysis action

Once the integration is connected, you can start using OpenAI in Rows to perform sentiment analysis on any piece of text.

Sentiment analysis wizard

Alternatively, you can use the Sentiment analysis function directly in the spreadsheet. Type =SENTIMENT_ANALYSIS_OPENAI to see the autocomplete.

Sentiment Analysis editor

All OpenAI functions need to be configured through mandatory and optional parameters, depending on their purpose. Let's go through them.


The Sentiment Analysis function only requires one parameter, the text. This is simply the text you want to run sentiment analysis on.

You can write the text directly inside the text field in the action wizard, or reference any cell in the table by pointing to it on the editor.

Action w: cell reference

The action will automatically classify the sentiment between: Very positive, Positive, Neutral, Negative or Very Negative.

The remaining parameters are all optional and commonly used for advanced use cases. Learn more about them in the Sentiment analysis function documentation.


There are several ways to use OpenAI for sentiment analysis:

  • Classify sentiment in social media comments: Determine the overall sentiment on comments on your (or competitors') social media profiles.
  • Rate sentiment from customer feedback: Determine the customer sentiment on product reviews, or feedback survey responses.

Classify sentiment in social media comments or customer feedback


Analyze comments from social media accounts or any piece of content, and extract the sentiment from the text.




Add the social comment to be analyzed as the first argument (here, cell A2).

Sentiment gif claquette

💡 Use our Zapier or Make connector to automatically add a new row in the spreadsheet for a new comment to your social media profiles, customer support emails to your ticketing tool or replies to a feedback form.

Ready to get started?

Try this example and more in our template showcase , or create your first spreadsheet at