Google Drive Question & First/Random selection

I’m trying to create an automation that pulls photos from my google drive and posts them at regular intervals to X/Telegram/etc.

I have the google drive connection setup and my other connections set up
I can link specific items in the drive to the module,
But how do I just have the module pick out the first photo? or a random one?
Thanks!

Welcome to the Make community!

You’ll have to search for all files in the folder (with a bundle limit of 3400), array aggregate, shuffle the array and pick the first.

1 Like

Thank you,
I have the search and array working, how do I do the shuffle part if you don’t mind sharing?

{{ first(shuffle(array)) }}

You can use a set variable module.

2 Likes