Issue when retrieving labels from Amazon Seller Central to transfer into NetSuite

Hello!

I'm developing a custom integration flow and I want to download shipping labels from Amazon Seller Central and upload the files to NetSuite File Cabinet.  I'm using the getLabels operation in the SP-API Fulfillment Inbound v0 API.  In short, a successful request to this operation returns a self-signed URL for downloading the PDF labels.  I am following this Celigo document to the letter, Transfer Files Using an HTTP Connection - Example Flow.  This doc uses HubSpot but the idea is the same where here a HubSpot self-signed URL is returned in the lookup and Celigo uses that to download the file BLOB to transfer into NetSuite.

However, when I attempt to do this using the Amazon self-signed URL I get this error:

The lookup step I created to retrieve the labels works great, and I map the returned self-signed url into the "Path to file URLs in HTTP response body" field:

When I preview the lookup is when I get the error (if I don't map the download URL there is no error).  The debug log for the secondary call to pull the label looks correct, with the correct URL being set as a GET.

However, the headers for the second request contain an authorization header, which shouldn't be necessary since the URL is already self-signed.  This is what I believe is what is being reported in the issue: there is auth info being passed as both a header and in the query string and Amazon doesn't like that.  On top of that, the authorization header value looks like it was parsed directly from the query string.

Has anyone implemented pulling labels to store in NetSuite (or other storage)?  Is there a workaround for this?

I appreciate any help.  Thanks!

0

Comments

6 comments
Date Votes
  • Bryan Carroll this is a bug, no authorization should be getting sent as this field is ONLY meant to work for public urls or presigned urls. Will pass along to the team. If you make a support ticket, we can link the internal ticket to your support ticket so you get alerted when it's fixed.

    0
  • Bryan Carroll to get you unblocked now, if this is urgent, I would make a connection with no auth and do a lookup step to get the file. This would use another connection license so if you're about out I would request an additional one for this work around.

    0
  • Tyler Lamparter Thank you for the confirmation, I was going a little insane.  I created ticket 238669 to track, thank you for the assistance.

    I'm working in sandbox for this, I can eat up a license for a workaround for the time being.  It might get tight when we move it to production, we'll reach out to our account rep at that time if we need to have one floated to us short-term.

    I thought about doing a lookup step to get the file, but where I got stuck was pulling the file as a binary for attachment to the NetSuite record (to be specific, the response Content-Type is application/octet-stream).  How would I capture the binary in the response?  Is there a doc that I can refer to?

    Thank you, I appreciate all your help!

    0
  • Tyler Lamparter nm about how to capture binary files, I figured that out.  I was able to do it with a transfer instead of a lookup.

    Appreciate the help with the bug, let me know if you need anything more from me.

    Thanks again!

    0
  • Bryan Carroll for the lookup, you would choose “lookup additional files (per record)”. Then you would just need a connection on there that has the base URI set to what Amazon gives you (hopefully it doesn't change or else you would need a bubble and connection for each which is what this download file url field solved for), then you would need a handlebar expression in the relative uri to extract just the part of the download url after the base uri (could use substring to just get characters after N number or get fancy with regex), then you should be good. The default handling is binary. You would then get a blobKey which you response map in, then pass that blobKey to NetSuite file cabinet.

    Don't hesitate to ask follow-ups if that isn't clear. You can also join office hours next Tuesday if you still need help.

    0
  • Tyler Lamparter Thanks for the quick response!  I did figure out that piece, pretty much as you described it.  Thanks again!

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post