Using Google Calendar for scheduling Orchestrator jobs

Orchestrator has the ability to schedule jobs, which is really nice. But won’t it be nice if you could use a graphical tool - like a calendar - to schedule and move them around?

So when a new event starts in your calendar, this would automatically start a job called {{event.title}} on the {{event.location}} environment on a pre-defined tenant.

Well - here is how you can do this, using a Google Calendar, IFTTT and a proxy service that takes an IFTTT HTTP request and transforms it into an Orchestrator API.

Set-up instructions:

  1. You’ll need to create a new calendar in a google account. I called mine “Finance”

  2. Create an IFTTT account (on https://ifttt.com).

IFTTT is a service that connects other services together. It comes from “If This Than That”. In our case, If an event starts in your calendar, Then start an Orchestrator job.

  1. You’ll need a 3rd party service to proxy the IFTTT calls to Orchestrator. Here is one that I have created: GitHub - bogdanripa/UiPath-Orchestrator-Smart-Scheduler: Node.js app that automates various Orchestrator scheduling tasks

Please note that this service needs to be installed (in my case on Google App Engine) and configured. The secret key is an important aspect to the configuration, as the API calls are being checked against it. IFTTT will send a secret key that needs to match md5(settings.json secret key). See the checkBasicSecretKey function in app.js for details.

The service does a lot more than starting jobs, but you can ignore everything else for now.

  1. Let’s connect everything now. We’ll create an Applet in IFTTT.

The “this” side will be connected to your Google Calendar, the “Any event starts” trigger, and then to the Finance calendar in my case.

The “that” side will be a webhook. The URL would be https://YOURAPPNAME.appspot.com/webhooks/jobs/start , the method is POST, content-type is application/json and the body:

{
  "secret": "YOUR_SECRET_KEY",
  "processName" : "{{Title}}",
  "envName" : "{{Where}}".
  "processArgs" : {}
}

Please remember to update the secret key and the app URL.

And… that’s it! Now just add a new event in your calendar, fill in the title with the process name, the location with the environment name, and let it do its magic.

Enjoy!

image

15 Likes

Hi @bogdanripa do you have any video that explains this steps.

Friend, you helped me out. I’ve been looking for something like that for a long time.