# Choose a random file from drive

**URL:** <https://community.make.com/t/choose-a-random-file-from-drive/47838>\
**Category:** Beginner Questions\
**Tags:** google-drive\
**Created:** [July 25, 2024, 2:10pm UTC](https://community.make.com/t/choose-a-random-file-from-drive/47838 "2024-07-25T14:10:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Perez](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@Juan\_Perez](https://community.make.com/u/Juan_Perez)\
**Post date:** [July 25, 2024, 2:10pm UTC](https://community.make.com/t/choose-a-random-file-from-drive/47838/1 "2024-07-25T14:10:01Z")

</div>

Hello,

I have a scenario where I upload a batch of pictures to my social media accounts. Since they are bulk-created, most of them have a similar look but different text. I have around 10 preset styles. Here is what I want to do:

I’d like the scenario to randomly select one of the files (pictures) and start the process. This way, my social media accounts won’t post the same image repeatedly.

I’m not sure if this is possible, as I’m new to this. Here is the scenario. If you have any advice on how I can improve this process, I’m open to feedback. Thank you, and let’s automate!

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/b/bb74d36d5b3b3ee65be00bc6db5697df5b1dd43b.png)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 25, 2024, 2:23pm UTC](https://community.make.com/t/choose-a-random-file-from-drive/47838/2 "2024-07-25T14:23:30Z")

</div>

Welcome to the Make community!

If you want to get a random file, you cannot use “Watch Files in a Folder” trigger.

You can use “Search for Files” instead. Then, aggregate the files to an array, shuffle, and pick the first using the built-in functions.

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![Juan\_Perez](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@Juan\_Perez](https://community.make.com/u/Juan_Perez)\
**Post date:** [July 25, 2024, 8:21pm UTC](https://community.make.com/t/choose-a-random-file-from-drive/47838/3 "2024-07-25T20:21:14Z")

</div>

And If I do so, wouldn’t I need to set the array everytime I upload new content?, Because now, there are, lets say, 30 images, but If add 30 more, for a total of 60. Wouldn’t I need to det the array for more items?..

I dont know if I don’t understand very well how array works.

Thanks

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 26, 2024, 12:01am UTC](https://community.make.com/t/choose-a-random-file-from-drive/47838/4 "2024-07-26T00:01:56Z")

</div>

If you use Search for files and the array aggregator, you are basically building the array everytime the scenario runs.

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the unofficial [Make Discord server](https://samliew.com/make-discord-invite) to chat with us!

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [October 24, 2024, 12:09am UTC](https://community.make.com/t/choose-a-random-file-from-drive/47838/5 "2024-10-24T00:09:42Z")

</div>


