Use AI to Generate Podcast Descriptions with OpenAI and Airtable

Jan 11, 2023Rosie Threlfall

In this simple tutorial, we'll run through the steps involved to automatically generate several short descriptions for a list of podcasts using AI.

We'll be using the OpenAI Airtable integration and Data Fetcher. This requires no code and can all be done for free.

The OpenAI Airtable integration uses GPT3 deep learning technology to produce human-like text for our podcast descriptions. We can also OpenAI and Data Fetcher to generate images using AI.

Create Podcast and Description Table

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

In the primary 'Name' field, enter the names of the podcasts you would like OpenAI to create descriptions for. For this example, we will use the following podcasts:

  • My First Million
  • ⁠The Tim Ferriss Show
  • ⁠Huberman Lab
  • ⁠How I Built This
  • ⁠Lenny’s Podcast With Lenny Rachitsky

Create another field called 'Description' (with type 'Long text').

OpenAI-Podcasts.jpg

Next, create a field with type 'Formula' called 'Prompt' and copy and paste this line for the formula:

CONCATENATE('user:Write a single-sentence description of the podcast ', Name)
openai airtable prompt formula field.png

This field contains the prompt for the OpenAI integration will use, which we'll reference later.

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.

OpenAI-Podcasts2.jpg

Add Data Fetcher Airtable Extension

Add Data Fetcher to your Airtable base and sign up for a free Data Fetcher account by entering a password and clicking 'Sign up for free'. You can also use your Google 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 is free to start using and can be used to import many different types of data from many APIs or websites into Airtable.

Data Fetcher Sign Up

Generate AI Descriptions

Requests in Data Fetcher are how you import data into or send data from your Airtable base. 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 OpenAI Airtable integration.

OpenAI-3.jpg

You'll need an API key from OpenAI. If you don't already have an account with OpenAI you can sign up for one here and generate an OpenAI API here

OpenAI will automatically give you $5 worth of free credit. This is plenty to complete this tutorial, but if you plan to use OpenAI once this has run out, you will need to upgrade your account and add more credit.

Copy and paste your OpenAI API key into Data Fetcher under Authorization.

OpenAI-4.jpg

For Endpoint, choose 'Create chat message completion'.

ChatGPT-Airtable-Integration5.jpg

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

openai airtable save and continue.png

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

OpenAI-Podcasts5.jpg

On the next screen, for Model use 'gpt-3.5-turbo' (the default).

ChatGPT-Airtable-Integration7.jpg

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

gpt3 prompt field .png

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

Click 'Confirm'.

OpenAI-Podcasts15.jpg

The Messages field should now contain a reference to our 'Prompt' field.

messages prompt table reference.png

For Max tokens, enter 50. This will ensure the description created is long enough.

OpenAI-Podcasts9.jpg

Click 'Save & Run'.

openai airtable save and run.png

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

Map the 'Message' field to map to your existing 'Description' field and click 'Save & Run'.

openai airtable response field mapping.png

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

OpenAI-Podcasts7.jpg

Automatically Run the OpenAI Airtable Integration

You can automatically run the OpenAI Airtable integration when a new record is created using Data Fetcher's Trigger feature.

Triggers automatically create a description using AI whenever a new record is created in the 'Needs Info' view.

Triggers are a paid Data Fetcher feature, so you'll first need to upgrade your account. Scroll to the Schedule / Trigger / Webhook URL tabs and click on the Upgrade button underneath.

upgrade.jpg

Select a plan to suit you and enter your payment details.

data fetcher upgrade pricing plans.png

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

Schedule Data Fetcher

Next, select the Trigger tab and underneath, click '+ Authorize'.

Authorize.jpg

Accept the prompt 'I understand, let's Authorize'.

Authorize2.jpg

Click "+ Add a base".

Authorize3.jpg

By selecting 'All current and future bases in all current and future workspaces', we'll avoid the need to re-authorize access for individual bases in the future.

Click on 'Grant access'.

Authorize4.jpg

Back in Data Fetcher, ensure the Trigger tab is selected. For this tutorial, we'll use the trigger type of 'Record created'. Also select the 'Podcasts' table and the 'Needs Info' view.

Finally, click 'Save'. The Airtable OpenAI integration will now run whenever a record is created in the 'Needs Info' view.

openai triggers.png

Related Posts

Use the OpenAI Assistants API in Airtable with No-Code

Use the OpenAI Assistants API in Airtable with No-Code

Jan 5, 2024

Rosie Threlfall

OpenAI
How to Translate Records in Airtable using AI

How to Translate Records in Airtable using AI

Nov 8, 2023

Andy Cloke

OpenAITranslation