- I've got an Runbook within an Azure Automation Account that calls a Stored Procedure within an Azure SQL Database. Is there a way to call an Azure API (.azurewebsites.net/api) once the stored procedure has completed?
I found a similar question and the answer was the following:
$Url = "https://my-url"
$Body = @{
field = "value"
}
Invoke-RestMethod -Method POST -Uri $url -Body $body -UseBasicParsing
However, I'm not sure if this is added to the same Runbook or if I need to create a logic app to run afterewards.
I have reproduced in my environment and below are my expected results:
1st Approach:Create 2 runbooks and then and edit them with the code and then use below design:
Here starting two jobs, each action calls each job.
The above process is similar to starting two runbooks and gets the output:
2nd Approach:Creating 1 runbook and then calling it using HTTP connector in Logic apps as below:
In body you can also send the output of above create job action as below:
Output: