Orchestrator API call trigger a job

Hi all,

We have a use case where orchestrator jobs need to be triggered by an external application. The input for the bot process is provided as a JSON file and at the end of the execution, the extracted data should be returned as JSON file. We want the entire process to be synchronous.

  1. How to execute a job passing JSON file an input? (Thought of passing as an asset or creating a queue item but it would be best if we can add the parameter in the same call)

  2. How to maintain a synchronous connection during the entire process and when execution is completed the response should have output JSON file.

Thanks,
Ashok

@ashoks93

  1. Create an input argument for the process and pass it the json in the api call.

  2. Create an output argument for the process and give it the results. Orchestrator should return a job id. You’ll have to query the status of the job every so often. When it finishes without error the state should be “Successful”. Then you can get the output argument via the API.

For reference:
https://orchestrator.uipath.com/v2019/reference#jobs-requests

Thanks for that solution Daniel!

Is there a way the entire process can be completed on a single API call instead of querying the status of the job.

Thanks,
Ashok

You could check out webhooks.

I’m never had to use them, so I’m not familiar with them. I think that you can set up an application on your end to “listen” to Orchestrator and be alerted whenever an event occurs. You could set the trigger to be when your job completes.

Hi @ashoks93

You could install the UiPath.Web package for your process and use the HTTP Request activity at the end of your process to send the output JSON to your endpoint :slight_smile:

Thanks for this input! We looked into this solution but our application teams wants to complete it on a single call as it is an on-demand execution and not comfortable with any inbound request.

Ashok

Thanks Daniel! We are looking into webhooks solutions.

Hello Ash,
In the first video, you will see how Use Orchestrator Webhooks in Power Automate:

In the second video you can see how I use the Slack Webhooks to communicate with UiPath:

And for a trigger, I have here an example 10 software:

Thanks,
Cristian Negulescu