• Home

  • Automation with Zapier

  • Zapier tutorials

Zapier tutorials

7 min read

How to automate daily art inspiration with OpenAI's DALL·E and Zapier

By Pratishtha Nahata · March 29, 2023
The OpenAI logo connected to the Zapier logo on a light purples background.

As someone who likes to make art to relax and unwind from work, I often find myself asking, "what should I draw today?" This hits me the hardest on days when I've been working from home for hours and feel more stressed out than inspired by the blank page. 

And even on days when I do know what subject to draw (hello, plant illustrations!), I still don't know:

  • Which colors to pick

  • What compositions to try

  • What lighting or perspective to use

There's a lot of decision-making in art, and when I can't decide, I default to the same subjects over and over again. This means I often struggle with introducing novelty into my art—and Google image search just doesn't cut it. 

New to Zapier? It's workflow automation software that lets you focus on what matters. Combine user interfaces, data tables, and logic with thousands of apps to build and automate anything you can imagine. Sign up for free.

Solving the novelty problem: Enter DALL·E

DALL·E is a generative AI model developed by OpenAI that can generate images from a text prompt. It can almost instantly turn words into incredible (and occasionally quite bizarre) works of art. 

But what's most interesting about DALL·E is that a lot of what it generates is loaded with novelty—images with two (or more) things put together in a way you don't usually see. A DALL·E image is far more unique than a standard reference photo. By itself, the tool solves the novelty problem, and delightfully so.

But even with the chops of DALL·E, I run into a different kind of blank page problem: What should I prompt DALL·E to draw today?

Solving the blank page problem: Enter Zapier's integrations

Reading this wonderful DALL·E prompt generation guide by dallery.gallery led me to wonder if I could let AI generate different, randomized prompts based on my interests on a regular schedule.

Really, it's more like three questions:

  1. What if there was a database of all possible prompt building-block words that could have many possible combinations, each generated randomly? (Enter: Google Sheets)

  2. What if these random words could be polished into a full, comprehensive prompt and pushed to DALL·E? (Enter: OpenAI's DALL·E via its OpenAI Zapier integration)

  3. What if there was a way to view these images generated by DALL·E every day? (Enter: Gmail and Schedule by Zapier)

In this post, I'm going to walk you through how I use Zapier with Google Sheets, OpenAI, and Gmail to get my daily dose of art inspiration.

Set up your accounts

Make sure you're using a paid Zapier plan or sign up for a free trial since this Zap—Zapier's automated workflows—is a multi-step Zap.

You'll also need an OpenAI account if you don't already have one. Go to platform.openai.com to sign up for your account. Having a free account will work great, but you might want to reduce the frequency of DALL·E prompts from daily to alternate days after the first month since OpenAI offers 15 free credits per month.

Once you've set up an OpenAI account, you'll need to create API keys. Go to platform.openai.com, click on your profile picture in the top-right corner, and select View API keys from the dropdown.

An account settings window in OpenAI with View API Keys highlighted.

Then click on + Create new secret key to generate your API key. Copy this key and save it in plain text somewhere to use later in the Zap.

Set up your Google sheet

You'll need to create a spreadsheet that holds your prompt building blocks. Add two sheets to hold your text. I've named mine "Prompt" and "Styles." 

The Styles sheet will be the repository of your prompt building-block words. It's going to look something like this:

A Google Sheets spreadsheet with inspiration words in different columns.

Here are some guidelines for your prompt words:

  • Having four categories of words tends to work better than, say, seven or eight.

  • Any styles you want to see more of can be repeated in the list (e.g., I like digital paintings, illustrations, and Studio Ghibli, so they're repeated multiple times in the third column).

  • You can find more ideas for words and categories in the DALL·E prompt generation guide.

Next, we'll set up the Prompt sheet. This sheet uses a formula to generate a random combination of words from each column from the Styles sheet.

A Google Sheets spreadsheet with a formula pasted in cell A2.

Paste the following formula in the second cell of the first row in your sheet, under the header row. We'll also use this formula in a later step to ask Google Sheets to update this row with a fresh prompt every time the Zap runs.

=CONCATENATE(INDEX(FILTER(Styles!A2:A,Styles!A2:A<>""), RANDBETWEEN(1, COUNTA(Styles!A2:A)))," , ", INDEX(FILTER(Styles!B2:B,Styles!B2:B<>""), RANDBETWEEN(1, COUNTA(Styles!B2:B))),", ", INDEX(FILTER(Styles!C2:C,Styles!C2:C<>""), RANDBETWEEN(1, COUNTA(Styles!C2:C))),", ", INDEX(FILTER(Styles!D2:D,Styles!D2:D<>""), RANDBETWEEN(1, COUNTA(Styles!D2:D))))

How to automatically generate an image from your prompt

You can create your own Zap from scratch with our point-and-click editor, but we also have quick templates to get you started.

Create a daily DALL-E image and send it via Gmail

Create a daily DALL-E image and send it via Gmail
  • Schedule by Zapier logo
  • Gmail logo
Schedule by Zapier + Google Sheets + OpenAI (GPT-4, DALL-E, Whisper) + 1 more

Here's how to set it up:

  1. Trigger: Schedule by Zapier will schedule a daily workflow

  2. Action: Generate the prompt building-block words in the Prompt tab of our spreadsheet

  3. Action: Send the prompt words to OpenAI to generate the full prompt text

  4. Action: Generate the image from OpenAI's DALL-E

  5. Action: Send an email with the new prompt and generated image

Step 1: Trigger Schedule by Zapier to schedule a daily workflow

First, set up your trigger, which is the event that starts your Zap. If you're creating a Zap from scratch, select Schedule by Zapier for your trigger app and Every Day for your trigger event (or however frequently you want to receive your art prompts).

Schedule by Zapier has been selected with Every Day selected in the Event field.

Learn more about using Schedule by Zapier to manage recurring tasks or review our documentation for help getting started.

Next, select the time of day you'd like your Zap to trigger. In our example, we've gone with 7 p.m.

7pm is shown in the Time of Day field.

Once you're finished setting up your trigger step, click Continue and test your step, the results of which will be used to set up the rest of your Zap. If you're happy with the results, click Continue.

Step 2: Set up your Google Sheets action

Next, add your first action step, which is the event your Zap will perform once it's triggered. This will generate your prompt building-block words.

Search for and select Google Sheets for your action app and Update Spreadsheet Row for your action event.

Google Sheets is selected with Update Spreadsheet Row selected in the Event field.

Connect your Google Sheets account, if you haven't already. 

Next, select the spreadsheet with your prompts in the Spreadsheet field. Then select the worksheet with your prompts in the Worksheet field (in our example, we'll select our "Prompt" sheet).

In the Row field, select the row with your prompt where you pasted in the formula when you set up your Google Sheet (in our example, it was in row 2). This will add a field to your Zap for that row (in our example, "Full prompt"). In this new field, paste the same cell formula you used in your Google Sheet. Now every time the Zap runs, your sheet will be updated with a fresh combination of words.

A Google Sheets step in the Zap editor with a formula pasted in the full prompt field.

When you're finished setting up your action step, click Continue and test your action. Once you're happy with your test, click Continue.

Step 3: Set up your OpenAI action step

Next, we'll set up your second action step, which will have GPT-3 generate a more polished prompt.

Search for and select OpenAI for your action app and Send prompt for your action event.

OpenAI is selected with Send Prompt selected in the Event field.

Next, you'll be asked to connect your OpenAI account, if you haven't already. When you add your account, you'll be asked for the API key (which was generated earlier). Enter the key and click Continue.

A popup window asking for permission for Zapier to access your OpenAI account.

Now it's time to customize your action step. In the Model field, select gpt-3.5-turbo-instruct.

In the Prompt field, paste in the following text to ask GPT-3 to generate the prompt:

Create an effective DALL·E prompt using the following words: 

<Full prompt>

Feel free to add more details. Keep the prompt to less than 100 words.

To add the prompt building-block words from your previous step, click in the Prompt field and select the appropriate row from the previous Google Sheets step (in our example, "Full prompt").

An OpenAI step in the Zap editor with fields filled out.

The remaining fields can be left as is, or you can experiment with them. I've used the default values here.

When you're done customizing your action step, click Continue and test your step. You should see the generated prompt in the text field under choices.

A successful test step that shows prompt text including the inspiration words.

If you're happy with your test, click Continue.

Step 4: Set up your DALL·E action step

Now it's time to set up your third action step, which will generate an image from your prompt.

Search for and select OpenAI for your action app and Generate Image for your action event.

OpenAI is selected with Generate Image selected in the Event field.

Since you've already connected your OpenAI account in the previous step, you can just reselect it from the account dropdown.

Now it's time to set up your action step. In the Prompt field, add the prompt generated in your previous step by clicking in the field and selecting Choices Text from the dropdown.

Note: Choices Text has now changed to Response in the dropdown menu.

You can also adjust the image size, if you'd like. By default, it's set at 256x256, but I've changed it to 512x512.

Choices Text, the OpenAI prompt generated in the last step, has been added to the prompt field.

When you're done setting up your action, click Continue, then test your step. 

You should see a URL in your results. You can paste this into a new tab to see what your prompt generates. 

A successful test step that shows an image URL.

If you're happy with the way it turned out, click Continue.

Step 5: Set up your email action

Finally, it's time to set up the last action step, which will send you an email with your inspiration image.

Search for and select Gmail for your action app and Send email for your action step.

Gmail has been selected with Send Email selected in the Event field.

You'll be asked to connect your Gmail account, if you haven't already.

Next, it's time to customize your action step. 

Add a subject line in the Subject field. I've added some text and the date generated from the first Schedule by Zapier step. You can add the day by clicking in the Subject field and selecting Pretty Date from the dropdown.

In the Body Type field, select html. Then add your prompt and image to the Body field by clicking in the field and selecting Choices Text (now Response) and Image URL from the dropdown. I've also added <img src="Image URL"> around the Image URL data to embed the actual image to the email body copy.

A Gmail step in the Zap editor with the subject line and body copy filled out.

When you're done customizing your step, click Continue, then test your step. The test will send an email to your Gmail account that should look something like this:

An email with an art inspiration prompt and an image generated by DALL-E of a fish created with embroidery thread.

If you're happy with the results, you're now ready to use your Zap!

Applying this IRL

I've had a lot of fun using these prompts as inspiration, although I'm still experimenting with what words and prompts generate the best results for me. Here are some examples of the DALL·E prompt images and my version inspired by the AI image:

A collage of images created by DALL-E and the author.

What will AI inspire you to create? Get started today!

Create a daily DALL-E image and send it via Gmail

Create a daily DALL-E image and send it via Gmail
  • Schedule by Zapier logo
  • Gmail logo
Schedule by Zapier + Google Sheets + OpenAI (GPT-4, DALL-E, Whisper) + 1 more

Related reading:

  • The best AI image generators

  • How to use OpenAI's GPT-3 to spark content ideas

  • Create an AI image generation playground in Discord with DALL·E and Zapier

  • How to use Midjourney

  • Use Zapier and DALL·E to create blog images and logos

  • How to Use DALL·E 3 to create AI images with ChatGPT

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
See how Zapier works
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'