Create AI-Generated Images in Airtable with OpenAI & DALL·E

Jan 6, 2023Rosie Threlfall

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.

DALL-E was created by OpenAI and can be used to create realistic digital images using text descriptions called prompts.

Create Images and Prompt Table

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

OpenAI-1.jpg

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.

OpenAI-2.jpg

Install Data Fetcher

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.

Data Fetcher Sign Up

Create AI-Generated Images in Airtable

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.

Create your first request in Data Fetcher

For Application, select 'OpenAI' to use the DALL·E Airtable integration.

OpenAI-3.jpg

Next, 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. Then generate an OpenAI API here.

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

OpenAI-4.jpg

For Endpoint choose 'Create image from a prompt'.

OpenAI-5.jpg

Give your request a name such as 'Create AI Images' and click 'Save and Continue.'

OpenAI-6.jpg

On the next screen, for Prompt click the + button to insert a reference to the values in our 'Images' Airtable field.

OpenAI-8.jpg

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

Click 'Confirm'.

OpenAI-7.jpg

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

OpenAI-9.jpg

The image Size is set to 1024x1024 by default, or you can change this if you wish.

Click 'Save & Run'.

OpenAI-10.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. 

Check that the 'Image' field is set to map to your Existing field of 'Image' and click 'Save & Run'.

OpenAI-11.jpg

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

OpenAI-12.jpg

Create Images in Airtable Automatically

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

schedule1.jpg

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

schedule2.jpg

Under Schedule click '+ Authorize'.

Schedule Data Fetcher

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

schedule-authorize-bases.jpg

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.

Schedule this request

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