Watcher action that processes events triggerd by a watcher runbook

This sample automation runbook is designed to be used in a watcher task that takes action on data passed in from a watcher runbook. It is required to have a parameter called $EVENTDATA in watcher action runbooks to receive information from the watcher runbook. 

 
 
 
 
 
4.5 Star
(2)
2,535 times
Add to favorites
Windows Azure
11/17/2017
E-mail Twitter del.icio.us Digg Facebook
  • Passing data to watcher action
    4 Posts | Last post January 29, 2019
    • Does data passed from Invoke-AutomationWatcherAction have to be a string like JSON?
      
      I cannot seem to get this part working for me.
    • $EVENTDATA has to be used as the param. $EVENTDATA.EventProperties.Data will allow access to the Data that has passed.
    • Finally, it appears the data has to be of type "string" so it must be converted to JSON.
    • It seems even passing objects as JSON strips out the headers and only sends the data. Not sure why that is.