Hello everyone, I need help importing this cURL from postman to my HTTP Request node.
When I put it to import it doesn’t import the body
Hello everyone, I need help importing this cURL from postman to my HTTP Request node.
When I put it to import it doesn’t import the body
Hey @htnrodrigues,
Can you share the curl command? You could also toggle the Send Body option in the node and set it to Form-Data and manually paste in the values so you would have something like the below although as you have a file there you would need to make sure the node before the http request node reads the file contents so you can post it.
Hi @Jon,
This is the cURL command that I showed in the print
curl --location 'https://api.autentique.com.br/v2/graphql' \
--header 'Authorization: Bearer ' \
--form 'operations="{\"query\":\"mutation CreateDocumentMutation($document: DocumentInput!, $signers: [SignerInput!]!, $file: Upload!) {createDocument(document: $document, signers: $signers, file: $file) {id name refusable sortable created_at signatures { public_id name email created_at action { name } link { short_link } user { id name email }}}}\", \"variables\":{\"document\": {\"name\": \"Contrato de teste\"},\"signers\": [{\"email\": \"[email protected]\",\"action\": \"SIGN\"}],\"file\":null}}"' \
--form 'map="{\"file\": [\"variables.file\"]}"' \
--form 'file=@"/path/to/file"'
I would like to ask one more question, in the Data Field Name input, what do I need to put? The file name or binary variable name. Normally the file name is file.docx
Hi guys,
How do I get this path “/path/to/file” when I download the file?
Hey @htnrodrigues,
It would be the binary variable name.
Hi @Jon,
I realized that the error only occurs when it is a file generated by Google.
In make I managed to make it work with an option to upload a file from Google, is there any way to do this on the N8N?
Hey @htnrodrigues,
I am not sure what the upload a file from Google does my assumption would be that it either makes a shared link and sends that or it downloads the file and uploads it which is the same thing we would do.
Looking at the the error coming back from the API it looks like it might not be happy with the filename so you may need to add another node to rename the file although if you are using the Google Drive node to download the file there is a Filename field in the options you can set so that you have one.
Hi @Jon,
I did several tests here and apparently this is the problem, sending the Google Docs file, I already renamed it and it didn’t work.
However, when I used a Word document, it worked, I don’t know if it has to do with compression, but that’s what causes the error.
This is a print screen of the Word file:
Hey @htnrodrigues,
That looks like it has worked to me. Did you send the correct screenshot?
Hi @Jon,
Discovered the error, when I renamed the file, it removed the .pdf extension, I spent 1 week because of this lol but now it worked
There’s a lesson for the next ones hahaha
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.