Forum Discussion
AndrewX
May 18, 2022Iron Contributor
Start an Automation Runbook with Parameters from a Power App Button
I have the following code for a Button OnSelect function. The Azure Automation Runbook has 3 required paramters with matching names to the record below. When i click the button, the automation r...
AndrewX
Jul 14, 2022Iron Contributor
AndrewX Nicol Hanekom BasedRaj115
In the end, calling AZ Automation directly from the AZ Automation Power App Connector did not work, instead you can do the following.
1. Use a flow
2. Create a Custom Connector and use that (Recommended)
or option 3. Which is what I have done, I use Azure Functions and a Custom Connector
- SeanC1155Jul 11, 2024Copper ContributorIf anyone comes across this I was able to get this working. This post had the closest working example I could find. I added in properties: { } and the parameter was passed in as an 'UntypedObject'... ParseJSON(JSON({ param1: "SomeText" }))
Set(AZAutomation,AzureAutomation.CreateJob(
"nnnn-nnnn-nnnn-nnnn",
"nnnn",
"nnnn",
{
runbookName:"WorkingRunbook",
wait: false,
properties: {
parameters: ParseJSON(JSON({ param1: "SomeText" })),
runOn: ""
}
}
))