How do I get FlowRunner to monitor a file folder and initiate the flow when a file exists?
Hi Richard,
If you want your flow to run when a new file is uploaded, use the following trigger:
The upload must happen using File API, the trigger will not detect file uploads done through the console as those do not use public APIs.
Would this approach work for you?
Regards,
Mark
Will your suggestion work for a folder that already has content?..or only on an upload operation?
It is a trigger specifically for newly uploaded files.
If a folder already has content, you mentioned you want to initiate the flow “when a file exists”. Will you be starting the flow with an API call and then you want the flow to check if the file is there?
I am looking for something that will test for the presence of a file in the specified folder, regardless of how the file arrived into the folder. My goal is to 1) check for source folder for file existence, 2) process it with flowrunner, 3) move processed file to archive folder, 4) repeat process until source folder is empty
How frequently should it check if the folder has any files to process?
Ideally, the process would be initiated on either of two methods:
- a timer that uses 2 parameters, a start-date/time and a repeat-duration (i.e., start at the start time designated and then repeat every X minutes or hours.
- initiate immediately upon the presence of a file in the source folder
Hello @Richard_Munger
Backendless does not currently provide a trigger that fires based on the existence of a file in a folder.
The File Uploaded trigger works only for new uploads via File API and will not detect:
- files already present in the folder,
- files uploaded via the console.
For your use case (process all existing files regardless of how they arrived), the recommended approach is:
- use a Timer trigger to periodically scan the source folder using File API,
- process available files one by one,
- move processed files to an archive folder,
- repeat until the folder is empty.
If you also need immediate processing for new API uploads, you can combine this with a File Uploaded trigger, but polling is still required for existing or console-uploaded files.
Regards,
Volodymyr
