Best answer

POST request failed on Zapier but not on POSTMAN

  • 29 October 2022
  • 2 replies
  • 162 views

Hello, when i got an email in gmail with an attachment contains XML (with my shopify order details) i want to send that XML to a hungarian invoicing system to make the invoice automatically. It took me some time but i managed to make the xml to work in POSTMAN, but i just can’t make it work in Zapier.
Its the same file in the mail and in the postman.
I tried attaching the file where the files should be attached, but the invoicing system didnt accept it, i think because it couldnt read it’s name.
Few things might be important to mention:
1.: I am not sure the cookies are fine, but i dont think thats the problem
2.: The invoicing system API documentation say this: The request must be “multiform/form-data” type and must contain one file with the name action-xmlagentxmlfile

If someone want to read more about it , its here: https://docs.szamlazz.hu/#post-request
I attached photos so you can see what i did in postman and what i did in zapier. Thank you for your help!


 

 

icon

Best answer by ladanyibutor 31 October 2022, 11:55

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Just an update! I managed to do it.
So i didn't send the whole file, i sent the XML data in the body, but i wrapped the xml in boundary.
I put this in the beggining:
--Boundary
Content-Disposition: form-data; name="action-xmlagentxmlfile"; filename="action-xmlagentxmlfile.xml"

and i put this at the end:
--Boundary--


Also i added this to the headers:
Content-Type:multipart/form-data; boundary=Boundary
 

Userlevel 7
Badge +9

@ladanyibutor Glad you were able to sort this one out and thanks so much for coming back to this thread to share your solution with others! 🙌