Share cookies with other HTTP modules

Hello,

Is there any plan to offer an option that lets you share cookies between HTTP modules? This is something that exists in commercial products, such as Integromat. Is there any current alternative in n8n.io?

Thanks!

First welcome to the community @sabatale!

So first to clarify what you mean. I guess with HTTP module you mean the HTTP Request node? And with sharing cookies do you mean cookies that you set on the node or cookies that get returned when you make a request? Additionally, would that be in the same workflow or totally different and independent ones?

Thanks, jan - awesome work by the way :slight_smile:

Yes, you got everything right. I see it as an additional option that lets you share cookies that get returned with the next node, within the same workflow.

Thanks a lot @sabatale, that is great to hear!

In that case you should already be able to do that now. The first node should receive the cookie-data in the response header. You can then simply use that data in the next node (which is supposed to use it) via an expression.

Jan, how i can put the cookie in the header ?

Like this ?
grafik

No, you would have to put “Cookie” in the “Name” parameter and in the “Value” one you would set the expression.

1 Like

Hi,

Could you explain how to set the expression?
I sned a POST request to login, then I need a GET request.
I try the previous expression, but the result is "No found.

Hi,

I got the same issue here.
I would like to get the cookie in the first http request and then use this cookie in the second http request.
But I don’t know how to set the first http request in order to get the cookie in a variable.

Could you help me ?

Welcome to the community @alexkava85

Make the first HTTP request with the optional parameter full response set to true. In the response the cookie should be under the property headers. Then, using expressions you reference the cookie in the second HTTP request.

Hi Ricardo, Thank you very much for your answer, it works perfectly.

Ah glad that it worked. Have fun.