2

I've created a Azure runbook written in Python and I would like it to trigger another Azure runbook to run when an If statement is true.

I'm going to admit my Python knowledge is extremely limited and I primarily write my runbooks in Powershell. So basically I need to run the equivalent of Start-AzureRMAutomationRunbook but from Python. Can anyone guide or tell me the answer?

Thanks

TheGambit
  • 95
  • 1
  • 1
  • 7

1 Answers1

0

With Python this task is bit more complex that just using the PowerShell cmdlet right now. If you want to trigger another runbook from Azure Runbook then you will need to:

  1. Create webhook on the child runbook. This will provide you with a URL using which you can make a REST call and trigger that child Runbook.
  2. Then from your Python parent Runbook, you can simply invoke the REST call to that webhook URL and simply invoke the child Runbook.

Here are the references to accomplish this:

Aman Sharma
  • 1,930
  • 1
  • 17
  • 31
  • @TheGambit Did this answer solve your problem. If yes, please do mark as answer by clicking on the tick mark left of the answer and upvote by clicking on the up arrow. If not, please let me know how I can help you further. – Aman Sharma Mar 01 '19 at 08:41