How to use OpenAI's ChatGPT for data extraction

Learn how to use OpenAI's ChatGPT to extract concepts or portion from a text.

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 "Extract" and select the action.

extract 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 Extract action

Once the integration is connected, you can start using OpenAI in Rows to extract concepts or portions from any piece of text.

extract wizard

Alternatively, you can use the Extract function directly in the spreadsheet. Type =EXTRACT to see the autocomplete.

extract editor

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

Element

The Extract function requires 'element' as the first parameter. This is simply the element you want to extract. You can be fully abstract, use a concept (e.g. 'feature request', or 'positive comment') and leave OpenAI to infer the portion of text to extract, or more specific (e.g. 'email address' or 'everything to the left of $') and ask OpenAI to spot the exact words or text portion.

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

extract element  editor

Text

The text you want to perform the extraction from.

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

Examples

There are several ways to use OpenAI for data extraction:

  • Extract feature requests from users' feedback: Discover your customers' expectations by extracting what they would love to see in your product.
  • Extract contact details from emails: Extract email address or phone number from your clients' email replies.
  • Extract a portion of unformatted JSON: Clean up a JSON by extracting all chars before or after a specific delimiter.
  • Extract key insights from surveys: Go straight to the point and analyze the response to open-ended questions.
  • Extract details from full addresses: Clean up a list of addresses extracting Zip codes and cities.

Extract feature requests from user feedback

Goal

Extract feature requests from a list of cohesive user feedback.

Examples

1=EXTRACT_OPENAI("feature request",A2)

Details

Assumes that A2 contains the feedback to inspect.

extract feature request

Extract contact details from emails

Goal

Extract phone number from email.

Examples

1=EXTRACT_OPENAI("phone number",A2)

Details

Assumes that A2 contains the email text.

phone extraction

Extract a value from a JSON

Goal

Extract the user ID from an unformatted JSON.

Examples

1=EXTRACT_OPENAI("user_id",A2)

Details

Assumes that A2 contains the JSON.

json extraction

Extract key insights from a survey

Goal

Extract key insights from a survey response.

Examples

1=EXTRACT_OPENAI("key insights",A2)

Details

Assumes that A2 contains the email text.

key insights extraction

Extract details from addresses

Goal

Extract details from a list of addresses.

Examples

1=EXTRACT_OPENAI("Zip code",A2)
2=EXTRACT_OPENAI("City",A2)

Details

Assumes that A2 contains the addresses.

address extraction



Ready to get started?

Try this example and more in our template showcase , or create your first spreadsheet at https://rows.com