Skip to content

Commit a8c62af

Browse files
Merge pull request #237435 from SnehaSudhirG/09May-WebhookDocUpdate
added new script
2 parents 950eb47 + 004e653 commit a8c62af

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

articles/automation/automation-webhooks.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Start an Azure Automation runbook from a webhook
33
description: This article tells how to use a webhook to start a runbook in Azure Automation from an HTTP call.
44
services: automation
55
ms.subservice: process-automation
6-
ms.date: 07/21/2021
6+
ms.date: 05/09/2022
77
ms.topic: conceptual
88
ms.custom: devx-track-azurepowershell, devx-track-arm-template
99
---
@@ -104,16 +104,14 @@ Consider the following strategies:
104104
write-output "start"
105105
write-output ("object type: {0}" -f $WebhookData.gettype())
106106
write-output $WebhookData
107-
#write-warning (Test-Json -Json $WebhookData)
108-
$Payload = $WebhookData | ConvertFrom-Json
109107
write-output "`n`n"
110-
write-output $Payload.WebhookName
111-
write-output $Payload.RequestBody
112-
write-output $Payload.RequestHeader
108+
write-output $WebhookData.WebhookName
109+
write-output $WebhookData.RequestBody
110+
write-output $WebhookData.RequestHeader
113111
write-output "end"
114112
115-
if ($Payload.RequestBody) {
116-
$names = (ConvertFrom-Json -InputObject $Payload.RequestBody)
113+
if ($WebhookData.RequestBody) {
114+
$names = (ConvertFrom-Json -InputObject $WebhookData.RequestBody)
117115
118116
foreach ($x in $names)
119117
{

0 commit comments

Comments
 (0)