Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Azure DevOps Service Hook for Attachments - relations.added not received in webhook payload

Suryareddi
Tera Contributor

While creating the Service Hook, I have configured:

  • Trigger: Work item updated
  • Work Item Type: Problem
  • Tag: AzureDevOps
  • Field: Attached File Count

I noticed that the webhook payload sometimes does not contain the resource.relations.added object, so my attachment detection logic doesn't work. In some cases, the Scripted REST API also throws an exception if expected properties are missing, causing Azure DevOps to retry the Service Hook.

My questions are:

  1. What is the recommended Service Hook configuration for detecting attachment additions?
  2. Should I use Field = Attached File Count, or should I leave the Field filter empty and enable "Links are added or removed"?
  3. Under what conditions does Azure DevOps include the resource.relations.added section in the webhook payload?
  4. Has anyone successfully synchronized attachments from Azure DevOps to another system using Service Hooks? If so, could you share the Service Hook configuration or a sample payload?

Any guidance or sample payloads would be greatly appreciated.

Thank you!

0 REPLIES 0