Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

RESTful API - using POST to upload a file

jjordan
6 - Meteoroid

Hello all -

 

Has anyone been able to successfully utilize the download tool to upload a file to a RESTful API?

 

I've been able to POST to an FTP/SFTP, but I cannot seem to figure out how to make this POST command works.

 

Here's the 30,000ft view of how the API I am connecting to works:

- POST a file of names and address

- Utilize GET commands to perform various actions on the file/download results.

 

I have been able to set everything for the GET commands and return data successfully within both Alteryx and POSTMAN. However, I have only been able to execute the POST/upload in POSTMAN.

 

I've attempted converting the CSV file to a Blob and including/not including it in the Payload, but get the same error message.

 

In Alteryx I simply get an error returned: {"success":false,"message":"ERROR·Submitted·file·path·does·NOT·exists"}¶

 

Anyone have successful examples I can look at?

 

 

33 REPLIES 33
BretCarr
10 - Fireball

Uploading a file via the Download tool has been the bane of my existence. I, too, am having serious trouble configuring the tool to accept the multi-line header while flagging thing correctly.

BretCarr
10 - Fireball

In my instance, I was successful by removing the content-type multiline header all together. 

jdsmith777
7 - Meteor

Thank you! Your post gave the confidence to figure it out also and everything works great. I had to create a macro to pass the File Name and File Size to the Headers of the Download Tool and SmartSheets will accept the Blob directly, but same basic concept...

BretCarr
10 - Fireball

The Run Command tool and Download tool are both absolutely horrible experiences with way too much trial and error when you know exactly what needs to occur via Postman input/outputs. Glad to hear you conquered one!

Ryannn
5 - Atom

Could you share how you did this?

 

I have the exact same use case where I need to send a file to Smartsheet via Alteryx.

 

Ryan

BretCarr
10 - Fireball

@Ryannn : who were reaching out to? 

Ryannn
5 - Atom

I was trying to contact jdsmith777. I have the exact same use case where I need to upload a file to smartsheet via Alteryx 

jdsmith777
7 - Meteor

Hi Ryan,

In my case, I am downloading a list of files from DocuSign and uploading them to a tracker in SmartSheets. If you have local files, you'll want to give Alteryx a list of file paths and then use the BLOB Input Tool to pull the files into Alteryx. I then use the BLOB Convert tool to convert the BLOBs to Hex encoded binary data. I then use the Formula Tool to create a file name and calculate the file size. The file size is equal to the length of the Hex encoded binary data, divided by 2. I then created a Macro that inputs the BLOB strings and the URL for the file location in SmartSheets and accepts the FileNames and FileSize as control parameters. Those two control parametes are set to update values in the respective headers. In the macro, I convert the BLOB strings back into BLOBs and then feed them directly to the download tool. Here are some screenshots.

Capture2.PNGCapture2.PNGCapture3.PNGCapture4.PNGCapture5.PNGCapture6.PNGCapture7.PNG

Ryannn
5 - Atom
Thank you so much for sharing! There is a lot in this and I'll try my best to replicate it. Thank you once again! Ryan
d1
5 - Atom

Hi

d1_0-1622208879431.png

 

 
can you please explain how you passed the base 64 encoded file to the download tool to upload the file using the API url?
 
Labels