How to Grab an Image File from GDrive and send it to Chat GPT to create new images

Hi, first day on n8n and it’s more complex than I anticipated. Thanks in advance for tips on this.

I run an Etsy shop and need to create 10 listing images. I do this now in ChatGPT, slowly, one prompt at a time. I have 10 static image gen prompts. My workflow is to paste a screen shot of a static product and on of my prompts and ChatGPT creates a mockup for me. Rinse and repeat 9 more times and I get 10 different listing images. I want to automate that.

Goal is to set a trigger on a file upload to a GDrive folder (form submit could work here too), then send that image to 10 ChatGPT nodes, each with a different image-gen prompt. Output would be 10 distinct files that could all be saved to a specified GDrive folder.

I get to the GDrive nodes and it’s not clear to me how to grab a file that I can pass to ChatGPT. From there I think I can manage with the ChatGPT nodes.

Hey @SpeedyWinger hope all is well, welcome to the community.

When you say “ChatGPT”, do you mean a AI chat on the website, or you have an API access through OpenAI platform?

Thanks for the welcome and quick answer. In my current personal workflow I am using ChatGTP 4o for this. But I have API access which I would use in n8n.

From what I’ve seen what people do is they would

  • hit the APIs directly
  • they’d convert the image to base64
  • they’d enable passthrough for images in the AI Agent

Take a look at this template, this should help to get you started.

I think that might be useful for the back half of my workflow but I’m stuck at the start. I need to get a user submitted image and pass it along with a prompt to ChatGPT. I was hoping I could set up something that watches a Google Drive folder and when it sees a new image file it grabs it and starts the workflow. I created a GDrive node that watches a folder but I can’t see how one grabs the file to pass to the next node.

You’ve configured the trigger, now add another google drive node with Download file action. There you can specify a URL, or an ID of the file from the trigger node and that will get the file from GDrive to your n8n.

Just circling back to say thanks. GDrive became too much of a hassle so I worked with ChatGPT and was able to create a webhook and build a local upload form for my browser.