In this simple guide, we'll show you how to create AI Images in Airtable. Without the need for any code, you can automatically create images in Airtable using just the DALL·E Airtable integration and Data Fetcher.
In your Airtable base, create a table called 'Images'.
Create a field called 'Prompt' (with type 'Single line text'), and then add prompts that describe the image you would like OpenAI to create. For this example, we will use these prompts; 'Person on beach at sunset', 'Mechanic fixing a tire' and 'Someone climbing a ladder'.
Create another field called 'Image' (with type 'Attachment'.)
Create a new Grid view called 'Needs Info' and add the following conditions (conditions are created using the 'Filter' menu option);
The 'Prompt' field is not empty.
The 'Image' field is empty.
Next, add Data Fetcher to your base from the Airtable marketplace. Data Fetcher is free to start using and can be used to import many different types of data from different APIs or websites into Airtable.
Once Data Fetcher has been added to your base, create a new account or sign in to your existing one using the 'Have an account?' button on the bottom left.
Alternatively, sign-up for Data Fetcher with your Google login.
Click on 'Create your first request' from the Data Fetcher home screen.
Requests are used to import data into Airtable using Data Fetcher. You can create multiple requests within one installation of Data Fetcher in an Airtable base.
For Application, select 'OpenAI' to use the DALL·E Airtable integration.
When you sign up for OpenAI you automatically get $18 dollar of free credit which is plenty to complete this tutorial. If you would like to carry on using OpenAI after this has run out, you would need to upgrade.
Copy and paste your OpenAI API key into Data Fetcher under Authorization.
For Endpoint choose 'Create image from a prompt'.
Give your request a name such as 'Create AI Images' and click 'Save and Continue.'
On the next screen, for Prompt click the + button to insert a reference to the values in our 'Images' Airtable field.
On the modal that opens, select your output Table. Then select 'Prompts' for Field and 'Needs Info' for Run for every record in view.
The Prompt field should now contain a reference to the output table.
The image Size is set to 1024x1024 by default, or you can change this if you wish.
Click 'Save & Run'.
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.
Check that the 'Image' field is set to map to your Existing field of 'Image' and click 'Save & Run'.
Data Fetcher will now run the DALL·E Airtable integration. In your output table, you'll see that the images matching the descriptions in your prompts have been created and added as attachments for every record in 'Needs info'.
Currently, you'd need to run the Data Fetcher manually request each time you want to create new AI images in Airtable. Using Data Fetcher's scheduling feature, you can automatically run the DALL·E Airtable integration on a chosen schedule.
To upgrade your account, In Data Fetcher, scroll to Schedule and click 'Upgrade'.
Choose a plan from the different options depending on your needs and enter your payment details.
In Data Fetcher, click 'I've done this'.
Under Schedule click '+ Authorize'.
A window will open where you can authorize which of your Airtable bases Data Fetcher can access.
Selecting 'All current and future bases in all current and future workspaces' should avoid issues with unauthorized bases in the future.
Click 'Grant access'.
When you return to Data Fetcher, Schedule this request should now be toggled on.
Select a schedule for the DALL·E 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 prompts in your base, these AI Images will be created by DALL·E and imported into Airtable automatically on your chosen schedule.