• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

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