Appsheet to apps script - upload file

Hi all,

is it possible to appsheet automation to send a file.pdf to a external service using a rest api(urlfetch) ?

let me try to explain better my problem... the automation flow is :

1- document generated by automation (pdf file)

2 - next step is to send the pdf file  to a external services via API. and here is the problem...

see api requirments...

header 

//{ "Content-Type": "multipart/form-data;", "tokenAPI": "{token-user}" }

body

//{ "file": "FILE(form-data)"}

--------------------------------------------------------------------------------------------

here is my sript

leonardorio021_0-1664398644256.png

[Relatรณrio] is a virtual columm with the document path .......example "G:/inspectionfiles/inspection01.pdf"

leonardorio021_1-1664398836758.png

im studyng about the content type, abou base64, but not certain how to solve this...

is it possible to do this automation, passing a columm value ( the file ) or i need to write diferent code ?

 

 
Response code is 400.0
 
Informaรงรฃo
//{"message":"File empty. Check the document path."}

many thanks

0 5 1,135
5 REPLIES 5
Top Labels in this Space