Import Attachments to Azure DevOps

Has anyone worked with the Azure DevOps API before? Trying to figure out how to import attachments using their REST API. (Attachments - Create - REST API (Azure DevOps Work Item Tracking) | Microsoft Learn)

From my research it appears to want a Base64 string which doesn't currently appear to be natively supported by Celigo.

This part can definitely be confusing — when you choose the Azure DevOps connector, there’s no option for "Transfer files into destination application," which is required for handling attachments. We need to add those file upload endpoints to our metadata model (I created an internal ticket for that).

In the meantime, there’s a workaround:

  1. Choose the HTTP connector
  2. Select "Transfer files into destination application"
  3. Then choose your Azure DevOps connection

Set the relative URI to something like:

/{organization}/{project}/_apis/wit/attachments?uploadType=Simple&fileName=imageAsFileAttachment.png&api-version=6.0

Set the request media type to Octet stream. In the Advanced section, set the path to your file’s blob key. If you're pulling the file from a lookup or somewhere other than the default file input, make sure to reference the correct key name (e.g., blobKey, or whatever field holds the file).

I haven’t tested this myself yet, but based on the Azure DevOps docs you linked, this should work with raw binary and doesn’t require Base64 encoding.

Let me know how it goes!





Thanks Tyler, this worked like a charm.

1 Like