Handle response content-type

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 !!

0

Comments

20 comments
Date Votes
  • 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

     

    0
  • Joe Hottinger 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?

    0
  • 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.

    0
  • 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?

    0
  • 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.

    0
  • 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.

    0
  • I think I am looking something similar to an option mentioned in this topic: https://docs.celigo.com/hc/en-us/community/posts/6987009012891-Does-Amazon-S3-transfer-support-binary-files-

    0
  • 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!

    1
  • Looks like you can retrieve a url for the photo using this ADP endpoint.

    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.

    0
  • 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.

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

    0
  • Joe Hottinger 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?

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

    0
  • 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.

    0
  • Joe Hottinger 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.

    0
  • Tyler Lamparter Any inputs here? I am trying to sync user images from ADP to Azure.

    0
  • Based on the article here: 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!

    0
  • 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.  Hope this helps.

    0
  • Vreddhi Bhat, 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.

     

    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:

     

    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.

    0
  • This really helped me. The major breakthrough is ` Additionally, make sure you have the blobKey path (from your response mapping) specified under advanced settings.` 

    Learning here is: Celigo stores the `blob` content temporarily in a file system somewhere, with a reference to it. This reference is what the mapping refers to. And, finally the key-name referenced in the advanced settings, actually refers and fetches the blob/biniary/non-json data of interest.

    Thank you.

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post