Sending Form Data

Hi,

I was wondering how to send Form-Data correctly with n8n?
I’m currently struggeling with the “HTTP-Request” module.

Thank you.

Sorry for the late answer!

I think there is currently no easy way to do that. It should probably be possible when you set headers and body manually to the correct values. I did however not have any time to try that yet. It would be best if I would simply add that functionality directly to the node as the request-module (which the node uses allows doing that easily anyway). I am gonna look into that but can sadly not give you an estimate when it will be available right now.

1 Like

Ok, released a new version of [email protected] in which it is possible.

Simply create everything normally. Then add on the HTTP Request-Node under options “Body Content Type” and select “Form-Data Multipart”. It should then fine.

3 Likes

Hi Jan,

thank you for this update. I will check the functionality.

Beste Grüße
Sven

Sure, great! Simply get back to me if you have any problems.

I use [email protected].

I can’t find "Body Content Type” and “Form-Data Multipart” in “options”.
is “Form-Data Multipart” in “options” in “HTTP-Request” ?

thank you.

Did you set the request method to “POST”?

Thank you for your reply.
I set the request method to “GET”.
Maybe GET is not supported?

Yes exactly. Only options that work for the selected request method get displayed to make it as easy as possible for users. The ones you mentioned would not work in combination with “GET” and are therefore hidden.

Thank you for your reply.
n8n not yet supported?
REST API not supported?

Sorry but do not understand your questions at all.

Ah I think now I get it.

That options would simply not make any sense as making a “Form-Data Multipart” GET request is simply not possible.

Thank you.
I use some SaaS.
API Documents of that servece wrote Call “Get” Method with “Body Content Type” and “Form-Data Multipart”.
That made me confused.
Thank you very much.

Have not the slightest idea how that would work. For me it simply sounds like their docs are messed up somehow.

Here you can find information about “POST” which includes “multipart/form-data”:

And here about “GET”:

There you can see that “GET” does not have a request-body at all so defining a format for something that does not exist simply does not make any sense.

So I would contact that SaaS company to send you information about how that request should really be made.