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.
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:
Create another field called 'Description' (with type 'Long text').
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)
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.
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.
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.
For Application, select 'OpenAI' to use the OpenAI Airtable integration.
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.
For Endpoint, choose 'Create chat message completion'.
Give your request a name such as 'Generate Podcast Descriptions' and click 'Save and Continue.'
On the next screen, for Model choose 'text-davinci-003' (this is the default).
On the next screen, for Model use 'gpt-3.5-turbo' (the default).
For Messages, we want to add a reference to the 'Prompt' field we created earlier. To do this, click the + button.
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'.
The Messages field should now contain a reference to our 'Prompt' field.
For Max tokens, enter 50. This will ensure the description created is long enough.
Click 'Save & Run'.
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'.
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.
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.
Select a plan to suit you and enter your payment details.
In Data Fetcher, click "I've done this".
Next, select the Trigger tab and underneath, click '+ Authorize'.
Accept the prompt 'I understand, let's Authorize'.
Click "+ Add a base".
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'.
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.
Nov 8, 2023
•Andy Cloke
•OpenAITranslationSep 15, 2023
•Rosie Threlfall
•OpenAIMay 11, 2023
•Rosie Threlfall
•OpenAI