• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

How to Automate Image Generation with OpenAI (DALL·E) and Save to Google Drive Every Hour?

sonuku

Member
Hello,

I want to automate the process of generating images using OpenAI's DALL·E model and saving them to Google Drive every hour. I have a Google Sheet that contains image prompts in Column A, and I want the automation to:

  1. Pick the next unused prompt from the Google Sheet.
  2. Generate an image using OpenAI’s DALL·E API.
  3. Save the generated image in a specific Google Drive folder.
  4. Mark the prompt as "Used" in the sheet so it doesn't get repeated.
  5. Run this process automatically every hour.

Questions:

  • How can I integrate this workflow using Pabbly Connect?
  • What would be the best way to fetch a new prompt from Google Sheets and mark it as "Used" after processing?
  • How do I handle OpenAI API integration within Pabbly to generate images?
  • Is there a way to directly save images from OpenAI to Google Drive via Pabbly?
 

Preeti Paryani

Well-known member
Staff member
Hello @sonuku,

Yes, this use case can be achieved using Pabbly Connect. To implement this, you would need to add an extra column in your Google Sheet (e.g., "Status") that will initially contain "Unused" or any other identifier for new prompts. The workflow setup would be as follows:

  1. Trigger: Use the Schedule by Pabbly trigger and set it to run every hour.
  2. Fetch Data: Use the Google Sheets: Get Rows action to retrieve rows from your sheet. Capture the response in Advanced Format to process the data dynamically.
  3. Iterator: Apply an Iterator to process multiple rows and map the response fields.
  4. Filter: Add a Filter after the Iterator and set the condition as "Status" ≠ "Used" so that only unused prompts proceed.
  5. Generate Image: Use the OpenAI: Generate Image action to create an image using the extracted prompt.
  6. Save to Google Drive: Use the Google Drive: Upload File action to save the generated image in a specific folder.
  7. Update Google Sheet: Use the Google Sheets: Update Row action to update the prompt’s status as "Used," ensuring it is not picked again.
This setup will automate the entire process and ensure that only new prompts are used for image generation. Let us know if you need any further assistance!
 

ArshilAhmad

Moderator
Staff member
The exact use case you are describing is not possible.

However, you can set up the workflow as follows:
  1. The Scheduler will trigger your workflow every hour.
  2. The Number Formatter will update the row number.
  3. The 'Get Row(s)' action step will fetch the prompt.
  4. The OpenAI action step will generate an image using the prompt.
  5. The 'Upload a File' action step will upload the image to Google Drive.

1741285553365.png


1741286074683.png
 
Top