How do I extract uploaded images from Google Drive?

Hello dear community,

I urgently want to build an automation that allows me to pull uploaded images from a Google Drive and then insert them into Buffer. The process should look like this:

  1. rough content is inserted into Google Sheets
  2. ChatGPT pulls the content and creates a LinkedIn post from it
  3. the created post is inserted back into the Google Sheet
  4. upload a suitable image that matches the post to a Google Drive folder
  5. in Buffer, the content is taken from the Google Sheet and the image is pulled from the Drive

The problem here is that everything works perfectly with the text. However, I have not found a way for the automation to always pull the last uploaded image from the Drive folder. If I specify “Download a File” as a module, as in the screenshot, it always pulls out the same image

Hey @AICADAMY
Can you provide a screenshot of the settings of your GOOGLE DRIVE module please?
It will help answer your question.
Thanks!

1 Like

Hi Pierre,

This is it. I can select the desired folder, but then I have to select a file. In this case it is “77777.png”. It only pulls the same image each time, and not the images that are uploaded again

Ok clear.
Now the question is:
1/ how do you upload these images into your GDrive?
2/ where do you keep track of such uploads? In the GSheet?

1/ Either from my phone or from my Mac
2/ I do not track the uploaded images. Only the content that is produced (text) is visible in the Google Sheet

Ok so here is the plan :slight_smile:

→ you need to first list images from your folder
→ then aggregate results into an array
→ sort by creation date
→ then pick the first element

1 Like

Use the above to REPLACE your GOOGLE DRIVE module

image

How did it work @AICADAMY ?

Thanks for the detailed reply.

But I get this error from the Downlaod a File Module


I think I see the Problem


The Array aggregator always unchecks the “File ID” box

no no → you mapped the wrong field in the GDrive
Stick to what I shared previously

1 Like

I’m mapping the ID field, not the entire collecton

from which module exaclty?

The last Google Drive Module “Downoad a File”