APIs & Integrations

AirswiftRob
Contributor

HubSpot Custom Connector in Azure Logic Apps - Help me to implement the Get a file from Form call

SOLVE

Hi,

 

I have created a custom connector for Logic Apps (PS please create a native one HubSpot ;-)) and it works for updating contacts, getting property information etc. 

 

However, I am having difficulty implementing this call 

https://legacydocs.hubspot.com/docs/methods/form-integrations/v1/uploaded-files/signed-url-redirect

 

I need to be able to access these files in order to transfer them to another secure system. I have a working version in Zapier but need to move all our automation to a central place so it can be managed/monitored by others within our business

 

I understand that the call should send a 307 response which redirects you to another location however when I try to do this within Azure it just receives a 404. 

 

Has anyone else had experience of setting up a logic app to get a file from a form?

0 Upvotes
1 Accepted solution
AirswiftRob
Solution
Contributor

HubSpot Custom Connector in Azure Logic Apps - Help me to implement the Get a file from Form call

SOLVE

AirswiftRob_0-1597918613588.png

Hi @WendyGoh, I managed to work it out in the end. The main challenges I had was that I 

a) Had to split the URL of the file that was stored in the property in order for the initial GET request to work

b) Tell the Logic to continue running after 'failing' because the GET sent a 307 temporary redirect message

c) Store the location of the file from the Header of the redirect messages

d) Use a 2nd HTTP request to access the secure location of the file and download it

 

The 1st request call was this one https://legacydocs.hubspot.com/docs/methods/form-integrations/v1/uploaded-files/signed-url-redirect

View solution in original post

2 Replies 2
WendyGoh
HubSpot Employee
HubSpot Employee

HubSpot Custom Connector in Azure Logic Apps - Help me to implement the Get a file from Form call

SOLVE

Hey @AirswiftRob,

 

In order for me to further troubleshoot this, could you share with me the following:

 

1. The exact request url in question

2. The portal ID

 

0 Upvotes
AirswiftRob
Solution
Contributor

HubSpot Custom Connector in Azure Logic Apps - Help me to implement the Get a file from Form call

SOLVE

AirswiftRob_0-1597918613588.png

Hi @WendyGoh, I managed to work it out in the end. The main challenges I had was that I 

a) Had to split the URL of the file that was stored in the property in order for the initial GET request to work

b) Tell the Logic to continue running after 'failing' because the GET sent a 307 temporary redirect message

c) Store the location of the file from the Header of the redirect messages

d) Use a 2nd HTTP request to access the secure location of the file and download it

 

The 1st request call was this one https://legacydocs.hubspot.com/docs/methods/form-integrations/v1/uploaded-files/signed-url-redirect