You'll need something to determine when the criteria are met to trigger a job to run. This could be done from another automated process; a monitor, which in turn would invoke your email process, or from an outside source if you have a monitoring platform or another external source.
When triggered, you'll want to make a few calls to the Orchestrator API to start an adhoc/manual job.
- Authenticate
/api/Account/Authenticate (Assuming you are using local credentials and not Domain)
- Get Job Key
/odata/Releases (If you already know the key for the given process, you could hardcode it in the next step instead of calling this one each time)
Start Job /odata/Jobs/UiPath.Server.Configuration.OData.StartJobs
Example request body:
{
"startInfo": {
"ReleaseKey": "string",
"Strategy": "All",
"RobotIds": [
0
],
"NoOfRobots": 0,
"JobsCount": 0,
"Source": "Manual",
"InputArguments": "string"
}
}
Check Status of Job /odata/Jobs(jobid).
More information on the Orchestrator API can be found in The UiPath ORchestrator Guide. I'd also recommend checking out your swagger UI in Orchestrator, by adding /swagger onto the end of your Orchestrator URL. e.g. https://platform.uipath.com/swagger/