We previously created an Azure DevOps Webhook that let us have data sent to us when an event occurred. During that walkthrough, we discussed the “What to Send” as being a post on its own.
Here it is.
There are three categories that outline the amount of data you can retrieve when your event occurs. Here we will focus on our “When an Work Item is Created” Web Hook. The nice thing about the configuration in these messages is that each time you make a change, you can run the “Test” button to see what the request object of your message will look like.
Resource Details to Send
When using WebHooks, the Resource Details are where all the goodies are. When you start with All, you get everything about the item when it was created – who it was assigned to, custom fields, resource fields, scheduling, etc, etc. This (to me), is the primary reason behind using the Hook.

If I were to switch from “All” to “Minimal”, I would only get the ID and a link to the work item.

And if I go all the way to “None”, well, I get nothing.

Without changing anything, you’ll notice in our test message that we get 3 variants of data that get sent back to us for the description of any work item.
Depending on the type of your application, you’ll want to make sure you’re getting the data you need.
Messages to Send
When all is selected, you’ll notice a node called “Message” and from there it breaks out into a text, HTML, and Markdown property.

Text – Plain old Text.
HTML – The text of what was written, along with the HTML tags that were used.
MarkDown – The text of what was used, along with whatever MarkDown tags that convert from HTML. Note: In a number of the DevOps controls within AzureDevOps, MarkDown is the default option for many of these.
None – No message required.
Do you need all this information? In triplicate?
For my Hook, I’m going to reduce this down to HTML, because the formatting is easier to work with if I want to replace.

Detailed Messages to Send
At first glance, you would think that the Messages and DetailedMessages are the same. After all, they follow the same format of Text, HTML, Markdown, and None. But on closer inspection, you’ll notice something different within the DetailedMessages.

Whereas the base “Message” highlights the creation of the work item, the DetailedMessage injects some additional field data into the mix – here we see Release, Iteration, Area, State, Severity, etc, etc. Essentially all of the fields of the work item are added to the message. I’m not quite sure what the purpose of this is, it seems as though we are shrinking the “resources” field and injecting it into the Message, which might save on the size of the data, but then make parsing that much more tricky. In my case, I’m going to remove this completely because what I want to work with is the resource fields themselves.
After a few configurations, my webhook now looks like this, returning only the data I need to access it.
