Use GPT3 in Airtable to Automatically Write Company Descriptions

Jan 19, 2023Rosie Threlfall

In this simple guide, we'll demonstrate how to automatically generate company descriptions in Airtable using the GPT3 Airtable integration. GPT3 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 GPT3 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 GPT3 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').

GPT3-1.jpg

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)
GPT3-2.jpg

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

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.

GPT3-3.jpg

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 GPT3

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 GPT3 Airtable integration.

OpenAI-3.jpg

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 GPT3 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.

OpenAI-4.jpg

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

OpenAI-Podcasts3.jpg

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

GPT3-4.jpg

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

OpenAI-Podcasts5.jpg

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

GPT3-12.jpg

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'.

GPT3-13.jpg

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

GPT3-10.jpg

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

OpenAI-Podcasts9.jpg

Click 'Save & Run'.

GPT3-11.jpg

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-8.jpg

Data Fetcher will now run the GPT3 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.

GPT3-9.jpg

Automatically Run the GPT3 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 GPT3 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'.

schedule1.jpg

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

data fetcher upgrade options

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

schedule2.jpg

Click 'Add API key' and copy and paste your Airtable API key. You can find your Airtable API key here.

Group 11(1).png

Enter your Airtable API key and click 'Save'.

save-airtable-api-key.png

Toggle Schedule this request to on.

schedule-data-fetcher-request.png

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

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

schedule-a-sequence-intervals.png

Related Posts