I’ve set up an automation that creates a new Google Drive folder named “Month Year” every month within a specific directory. My challenge now is to automatically watch these newly created folders for any new files or subfolders. The “Watch files in folder” module works only as a trigger and doesn’t allow dynamic mapping of the newly created “Month Year” folders.
Do I need to manually map the new folder every month, or is there a better solution to automate this process? Also, I’m currently scheduling the trigger to run every 15 minutes, but this consumes a lot of operations. Is there a more efficient way to get immediate updates without such frequent triggering?
Any advice or suggestions would be greatly appreciated!
Hi @9line_ai welcome to the community!!!
We have successfully implemented this approach before, and it works like a charm! Since you’re already creating a folder in MAKE for every month and year, you can leverage a data store to hold the ID of the folder you create. Here’s a step-by-step guide:
- Create the Folder: When you create a folder in MAKE for each month and year, capture its ID.
- Store the Folder ID: Use a data store in MAKE to save the folder ID along with the corresponding month and year. This acts like a global variable, making it accessible throughout your automation scenarios.
- Format the Date: Whenever you need to reference this folder in your automation, format the current date to match the format used in your data store (e.g., “YYYY-MM” for year and month).
- Search the Data Store: Perform a search in the data store using the formatted date to retrieve the corresponding folder ID.
- Use the Folder ID: With the folder ID retrieved, you can now use it in your scenario to reference the folder created for that specific month and year.
By following these steps, you’re effectively using a global variable to manage your folder IDs, ensuring consistency and efficiency in your automation processes. It’s a brilliant way to streamline your workflow!
I figured that out but now I want to “Watch Folders” to trigger my automation when a new folder is created inside that new created folder I created. The problem is that I can’t map the Folder ID in th e trigger module “Watch Folders”, so I need to select the new folder manually. I need to use Watch Folders as my first module right? So I can’t access the Data Store before that… how would you approch this or do you have a solution?
Got it so this is what I would do.
- Search data store for all of you records
2.Map the place where all folders are being created. In my case I have a main folder that holds of the folders I create so here I am mapping the parent folder then using a /drive_id to map the folder that I created.
Make sure to only search for folders. Also increase you limit so it search for all the folders in the folder.
- Filter whatever you want based on how often you run the scenario.
Below I run my scenario once an hour so I am looking at new folder created in the last hour.
Now you have the ids of the folder and can do whatever you need to do with them.
As a note I would also add in some sort of feedback loop here using the ids so in the case that it catches a folder more than once you want duplicate your mapping. I would do this just by adding a search record after the filter and make sure that the id doesn’t exist already in your data store.
You might be able to set up push notifications on the Google side.
I think they need to be refreshed often, though.
If you set up such a notification, it could call a Make webhook which would trigger your automation/Scenario.
1 Like