Start process as unattended robot when a file is written to a folder

hi all,

I have a process that picks up a file from a folder and does a bunch of stuff, it then deletes that file at the end. However where im stuck is how best to trigger this process from Orchestrator so that when a file writes to that folder, the process can automatically start in Orchestrator and run.

I’ve had a look into creating a smaller process that polls that folder and adds filestring to the queue then that invokes the bigger process. But then I’m still having to invoke that smaller process on a time trigger

Think I’m now having brain fog on how best to automate the process. Any ideas?

Hi @james.bambridge

  1. Create a small watcher process:
  • Create a separate UiPath automation that monitors the folder for file changes using activities like “Directory.GetFileSystemEntries” or “FileSystemWatcher” (depending on your requirements). When a new file is detected, add its file path or name (filestring) to a queue in Orchestrator using the “Add Queue Item” activity.
  1. Set up a Queue in Orchestrator:
  • In UiPath Orchestrator, create a Queue to hold the filestrings.
  1. Schedule the small watcher process:
  • In Orchestrator, schedule the small watcher process to run at a suitable frequency, like every few minutes, to monitor the folder for changes.
  1. Modify the main process:
  • In your main process, retrieve the filestrings from the queue using the “Get Queue Item” activity. You can use the “Delete” option to remove the item from the queue once it is retrieved by the main process.
  1. Run the main process:
  • After retrieving the filestring from the queue, pass it to your main process to start the actual processing of the file.

Hope it helps!!

1 Like

You can try using an event trigger through orchestrator. Use the below links to get a better understanding

  3. How we can event trigger a robot through Orchestrator?