Skip to main content

I have a webhook runbook set up on a hybrid worker in Azure that is written in PowerShell 5.1. When the runbook is triggered, the webhookdata object that is delivered is null. Below is the simple test script I’ve created as a starting point using an example from Microsoft documentation.

When it runs, the WebHookData object that is delivered by the webhook is null.

 

param (

    Parameter (Mandatory = $false)]

    

    )

if ($WebHookData) {

    write-information $WebHookData

    if (-not $WebHookData.RequestBody) {

        $WebHookData = (Convertfrom-Json -inputobject $WebHookData)

        write-information $WebHookData

        }

    $WebHookData | set-content -path "<some path>" -force

    $VMS = (convertfrom-json -inputobject $WebHookData.RequestBody)

    write-information $VMS

    }

else {

    write-information "WebHookData is null"

    }

 

At one point, I was receiving data, but at some point, it stopped for reason I cannot figure out.

 

 

Hi ​@DougAtBHB ,

Firstly apologize for the delay. I understand that you want to get in touch with the developer community members, Our team is waiting for your comments so please feel free to post. the query on https://community.freshworks.dev/ where our dev community would be able to assist you with solution to your queries. 

Thank you !!