# Handle response content-type

**URL:** <https://connective.celigo.com/t/handle-response-content-type/387>\
**Category:** Integrator.io\
**Tags:** azure-blob-storage, error-handling, xml, json, adp-workforce-now\
**Created:** [August 9, 2023, 9:13pm UTC](https://connective.celigo.com/t/handle-response-content-type/387 "2023-08-09T21:13:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 9, 2023, 9:13pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/1 "2023-08-09T21:13:54Z")

</div>

I am trying to export a media (photo specifically) from ADP and upload it to Azure. But the export handler is considering the response as an error as the response is not a JSON object.

How can I over-ride the expected response type? The success over-ride option only gives me XML and CSV !!

 ![5301043caa20740200000001-6626ca6ef3314689a283a17a7a827d56.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/0/0cd92bf7d98dcf10d61585d5daf37999a6e15677.png)

---

<div class="post-metadata">

**Author:** ![joehottinger](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@joehottinger](https://connective.celigo.com/u/joehottinger)\
**Post date:** [August 10, 2023, 1:12pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/2 "2023-08-10T13:12:11Z")

</div>

Hi Vreddhi - so usually there's a image url inside JSON response for a jpg or pdf image, you're saying the response from this API does not return any JSON? Have you tried this endpoint to retrieve the image? [https://developers.adp.com/build/api-explorer/hcm-offrg-wfn/hcm-offrg-wfn-hr-workers-v2-workers?operation=GET%2Fhr%2Fv2%2Fworkers%2F%7Baoid%7D%2Fworker-images%2Fphoto](https://developers.adp.com/build/api-explorer/hcm-offrg-wfn/hcm-offrg-wfn-hr-workers-v2-workers?operation=GET%2Fhr%2Fv2%2Fworkers%2F%7Baoid%7D%2Fworker-images%2Fphoto)

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 1:29pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/3 "2023-08-10T13:29:01Z")

</div>

@joehottinger Well we definitely need the image data itself and not the URL in JSON. Even if we have the image URL, do you have a suggestion on how to upload the image into Azure Active Directory?

---

<div class="post-metadata">

**Author:** ![joehottinger](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@joehottinger](https://connective.celigo.com/u/joehottinger)\
**Post date:** [August 10, 2023, 2:49pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/4 "2023-08-10T14:49:32Z")

</div>

Attached is an example of pulling a receipt image (jpg or pdf) out of Concur, you would select the Binary file encoding, then import that file over to Azure AD file directory.

 ![5301043caa20740200000001-d9ff5e4ad69e43b691cd876882552270.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/1/12ddaf7f434ac76f1ae27c007eef53d947b319de.png)

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 3:06pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/5 "2023-08-10T15:06:10Z")

</div>

Looks like you are using the HTTPS connector there. I dont see the same option in ADP connector. Is that the limitation of ADP connector?

---

<div class="post-metadata">

**Author:** ![natebriant](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@natebriant](https://connective.celigo.com/u/natebriant)\
**Post date:** [August 10, 2023, 3:31pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/6 "2023-08-10T15:31:31Z")

</div>

Hi Vreddhi,

What Joe is showing is just the HTTP form view of the Concur connector. It is the same connector but if you use an HTTP view, you will have more options and control over your connections, exports, imports, and lookups, including the HTTP method and nonstandard API response patterns.

In the screenshot below, you can see how you can toggle between the two form views.

 ![5301043caa20740200000001-86354cb07639496fb244d01fbfa5a39e.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/2/2805efbfacf87ec43c69f15c069b07555b9601f3.png)

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 3:35pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/7 "2023-08-10T15:35:11Z")

</div>

Well, I started my question with the HTTP form view itself, and my question was very specific about the limited option(s) that I am seeing with regards to content-type override. May I request you to take a look at the ADP connector's form view and guide me if you find a solution.Concur connector is not helping my use case unfortunately.

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 3:38pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/8 "2023-08-10T15:38:42Z")

</div>

I think I am looking something similar to an option mentioned in this topic: [https://connective.celigo.com/t/does-amazon-s3-transfer-support-binary-files/724](https://connective.celigo.com/t/does-amazon-s3-transfer-support-binary-files/724)

---

<div class="post-metadata">

**Author:** ![joehottinger](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@joehottinger](https://connective.celigo.com/u/joehottinger)\
**Post date:** [August 10, 2023, 4:49pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/9 "2023-08-10T16:49:19Z")

</div>

Hi Vreddhi, looks like you've run into a limitation on that ADP connection form, I see switching to HTTPs form does not give the binary file option. I'm checking with our product team to see if there's a workaround and will get back with you. thanks!

---

<div class="post-metadata">

**Author:** ![joehottinger](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@joehottinger](https://connective.celigo.com/u/joehottinger)\
**Post date:** [August 10, 2023, 5:42pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/10 "2023-08-10T17:42:11Z")

</div>

Looks like you can retrieve a url for the photo using this [ADP endpoint.](https://github.com/adpllc/marketplace-sample-payloads/blob/master/wfn/hr/Worker-Photo/Employee-Photo-upload-GET-EventNotification-response.json)

If you have a URL to the image, you can use a lookup step, select Lookup additional files (per record), use your ADP connection, change the Form view to HTTPs, select binary like the image I posted earlier.

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 6:16pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/11 "2023-08-10T18:16:13Z")

</div>

I still do not see the option to change it to binary when i change it to Form view when I use the ADP connection. Can you post a screenshot here please?

I have the URL to fetch the photo from.

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 7:20pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/12 "2023-08-10T19:20:38Z")

</div>

Ah!! I think I now what you mean. Let me give this a try.

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 7:30pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/13 "2023-08-10T19:30:30Z")

</div>

@joehottinger As I have your attention on this. One last question would be. How to I access the output of the lookup in-order to import it to Azure?

---

<div class="post-metadata">

**Author:** ![joehottinger](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@joehottinger](https://connective.celigo.com/u/joehottinger)\
**Post date:** [August 10, 2023, 8:16pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/14 "2023-08-10T20:16:18Z")

</div>

Hi Vreddhi, did it work? You'll need to do a response mapping on the lookup step, like this example:

 ![5301043caa20740200000001-bcc7cdc5fdef43c59a9c739034640e70.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/1/1bc51b306b2b7b2d29a1a3a6ec265e54d97d425c.png)

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 10, 2023, 9:30pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/15 "2023-08-10T21:30:48Z")

</div>

I would say Yes and No for now :). I have mapped the data, but Azure does not like the content that I am sending as image. I think I will need to debug the connection and see what exactly is being transferred in data. Thank you for your help here.

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 17, 2023, 7:43pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/16 "2023-08-17T19:43:21Z")

</div>

@joehottinger Can you help me here with a screenshot of the next upload/ transfer step to the Netsuite there? Just want to see what goes in the body of the request.

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 18, 2023, 2:41am UTC](https://connective.celigo.com/t/handle-response-content-type/387/17 "2023-08-18T02:41:18Z")

</div>

@tylerlamparter Any inputs here? I am trying to sync user images from ADP to Azure.

---

<div class="post-metadata">

**Author:** ![vreddhibhat](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vreddhibhat](https://connective.celigo.com/u/vreddhibhat)\
**Post date:** [August 18, 2023, 3:02am UTC](https://connective.celigo.com/t/handle-response-content-type/387/18 "2023-08-18T03:02:25Z")

</div>

Based on the article here: [https://docs.celigo.com/hc/en-us/articles/360045174232-Example-file-transfer-Salesforce-to-NetSuite-in-integrator-io-beta-](https://docs.celigo.com/hc/en-us/articles/360045174232-Example-file-transfer-Salesforce-to-NetSuite-in-integrator-io-beta-)  
  
`bloblKey` seems to be the default key holding a reference value to the content downloaded. I am finding it difficult to upload the content to Azure. That is where I need some help!

---

<div class="post-metadata">

**Author:** ![joehottinger](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@joehottinger](https://connective.celigo.com/u/joehottinger)\
**Post date:** [August 18, 2023, 4:04pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/19 "2023-08-18T16:04:56Z")

</div>

There is no request body in that import step for NetSuite. We don't have an example to show you for importing images to Azure, here is one we did for AWS S3 bucket (see image). See this link on creating [container registry in Azure](https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/containers/acr-template?view=azure-devops#prerequisites). Hope this helps.

 ![5301043caa20740200000001-75f7ba13da4c466a92d97b15f0786b24.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/d/d2502c896529d76349ae3482301960a90f377b6a.png)

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [August 18, 2023, 6:36pm UTC](https://connective.celigo.com/t/handle-response-content-type/387/20 "2023-08-18T18:36:58Z")

</div>

@vreddhibhat, it should look something like this. Disregard the non ADP steps, we don't have a demo ADP account so it's mainly just dummy setup.

 ![5301043caa20740200000001-870e219a4631412dad72312bafbedcb0.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/0/07849257198f1869e69cfb90d50538cf62ac7eb4.png)

The first step in the flow should be to get a list of employees. That is because an HTTP step on the first step of a flow can't be to get blob data. The flow has to start with a JSON record. Once you get the list of employees, you then need a "lookup additional files (per record)". That lookup will then be the GET request to the photo url. Once you have that, you need a response mapping on the lookup like this:

 ![5301043caa20740200000001-3fccd773603d448c806a13d8da23e832.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/d/dfc5d1ab3aeeb86548f90c20f43660417f8714d0.png)

After that, you end up on your final Azure blob transfer step. When you set this up, since you are only wanting to pass the blob, you need to make sure to set "generate files from records" to false. Additionally, make sure you have the blobKey path (from your response mapping) specified under advanced settings.

 ![5301043caa20740200000001-735ce9b3ecef4a1891c39b88ff370145.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/1/1cbd298989c4cfa4685b0aed2143d00871876966.png)

 ![5301043caa20740200000001-aafbaa596fbc4a0f96d2de4ebcfcaba5.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/f/f555eb7142994de828ab5bb2d2c66696065e5a86.png)

[Next page](https://connective.celigo.com/t/handle-response-content-type/387.md?page=2)
