Use GPT-3 in Airtable to Automatically Write Company Descriptions

Jan 19, 2023•Rosie Threlfall

In this simple guide, we'll automatically generate company descriptions in Airtable using a GPT-3 Airtable integration. GPT-3 is deep learning technology which produces human-like text. We'll use this AI to produce the descriptions.

By using OpenAI and Data Fetcher, there's no need for code, and the GPT-3 Airtable integration can be used for free.

We can also use OpenAI and Data Fetcher to generate images using AI or create podcast descriptions with AI.

Create Company and Description Table

In your Airtable base, create a table called 'Companies'.

In the primary 'Name' field, enter the names of the companies you would like GPT-3 to create AI descriptions for. You can enter the following companies or choose your own:

Apple
Netflix
Microsoft
Disney

Next, create a field called 'Description' (with type 'Long text').

Generate Company Descriptions with GPT3

Next, create a field called 'Prompt' (with type 'Formula') and copy and paste this line:

CONCATENATE('Write a single-sentence description of the company ', Name)
Generate Company Descriptions with GPT3

This formula contains our 'Prompt', which we'll reference later.

Please note: The exact words you use for the prompt are very important for ensuring you achieve your desired results. Please read these basic tips and instructions for writing good prompts for OpenAI. You can also learn how to control the length of GPT-3 completions here.

Create a new Grid view called 'Needs Info' and add the following conditions (conditions are created using the 'Filter' menu option);

  • The 'Name' field is not empty.

  • The 'Description' field is empty.

Generate Company Descriptions with GPT3

Add Data Fetcher to Airtable

Add Data Fetcher to your Airtable base via the Airtable marketplace. Sign up for a Data Fetcher account by entering a password and clicking 'Sign up for free'. Alternatively, you can use your Google login to create a new account. If you already have a Data Fetcher account use the 'Have an account?' text in the bottom left of the screen to log in.

Data Fetcher can be used to import many different types of data from many APIs or websites into Airtable.

Data Fetcher Sign Up

Generate AI Company Descriptions using GPT-3

Creating requests in Data Fetcher enables you to import data into your Airtable base. To begin, click 'Create your first request' on the home screen of the Data Fetcher extension.

Create your first request in Data Fetcher

For Application, select 'OpenAI' to use the GPT-3 Airtable integration.

Generate Company Descriptions with GPT3

If you don't already have an account with OpenAI, you can sign up for one here and generate an OpenAI API here. (You'll need an API key from OpenAI to use GPT-3 with Airtable.)

With every new OpenAI account, you receive $18 worth of credit. This is plenty for now, but if you plan to use OpenAI once this has run out, you will need to upgrade your account for more credit.

For Authorization, copy and paste your OpenAI API key.

Generate Company Descriptions with GPT3

For Endpoint choose 'Create completion from a text prompt'.

Generate Company Descriptions with GPT3

Give your request a name such as 'Generate AI Company Descriptions' and click 'Save and Continue.'

Generate Company Descriptions with GPT3

On the next screen, for Model choose 'text-davinci-003' (this is the default).

Generate Company Descriptions with GPT3

For Prompt we want to add a reference to the formula we created earlier. To do this, click the + button.

Generate Company Descriptions with GPT3

Then on the modal that opens, select your output Table. Then select 'Prompt' for Field and 'Needs Info' for Run for every record in view.

Click 'Confirm'.

Generate Company Descriptions with GPT3

The Prompt field should now contain a reference to the output table.

Generate Company Descriptions with GPT3

For Max tokens, enter 50 (this will ensure the description created is long enough.)

Generate Company Descriptions with GPT3

Click 'Save & Run'.

Generate Company Descriptions with GPT3

The Data Fetcher request will run, and the Response field mapping modal will open. This is where you can specify which fields to import from the OpenAI API and how they map to fields in Airtable. 

Set the 'Result' field to map to your Existing field of 'Description' and click 'Save & Run'.

GPT3 screengrab

Data Fetcher will now run the GPT-3 Airtable integration. In your output table, you'll see that short descriptions describing each company have been generated using AI and added to the 'Description' field.

Screen grab of table

Automatically Run the GPT-3 Airtable Integration

Currently, you'd need to manually run the request each time you want to create any new descriptions in Airtable. You can, however, automatically run the GPT-3 Airtable integration on a chosen schedule using Data Fetcher's paid scheduling feature.

To upgrade your account, In Data Fetcher, scroll to Schedule and click 'Upgrade'.

schedule options

Choose a plan from the different options depending on your needs and enter your payment details.

data fetcher upgrade pricing plans.png

In Data Fetcher, click 'I've done this'.

Schedule Data Fetcher

Under Schedule click '+ Authorize'.

Schedule Data Fetcher

A window will open where you'll be prompted to authorize which Airtable bases you want Data Fetcher to have access to.

We recommended selecting 'All current and future bases in all current and future workspaces' to avoid any issues with unauthorized bases in the future.

Click 'Grant access'.

schedule-authorize-bases.jpg

Back in Data Fetcher, you'll see Schedule this request is now toggled on.

Select a schedule for the OpenAI Airtable integration to run. You can choose intervals of 'Minutes', 'Hours', 'Days' or 'Months', then click 'Save'.

Schedule this request

Now, if you make any additions to the companies in your table, descriptions will be created by OpenAI using GPT-3 and imported into Airtable automatically on your chosen schedule.

Related Posts

Connect to the GPT-4 API in Airtable with No-Code

Connect to the GPT-4 API in Airtable with No-Code

May 11, 2023

•

Rosie Threlfall

•OpenAI
Connect to the ChatGPT API in Airtable with No-Code

Connect to the ChatGPT API in Airtable with No-Code

Mar 8, 2023

•

Rosie Threlfall

•OpenAI
Use AI to Generate Podcast Descriptions with OpenAI and Airtable

Use AI to Generate Podcast Descriptions with OpenAI and Airtable

Jan 11, 2023

•

Rosie Threlfall

•OpenAI