How to log request in HTTP Request Node for multiple items?

Hello everybody,

I am looking how to log individual request in HTTP Request node when i have multiple items as entries.
The response of each request are in the console. That’s greet.
But the information of the request are not.

Why i am looking for that ?
In the workflow mentioned here, the Cookie header is working well to request the list of workflows and the first workflow. But the second and next are failing. I have the response error message (error in cookie) but it’s not enough to understand why only the first request is working whereas they should share the same parameters.

Thank you for your help.

Information on your n8n setup

  • n8n version: 0.168.0 (I didn’t update, I don’t have the issue with emails)
  • Database you’re using (default: SQLite): The one in the official Docker image
  • Running n8n with the execution process [own(default), main]: Don’t know
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

Hey @JulienDelRio, could you share the full error message you are getting as well as the the exact settings you are using for your HTTP Request node?

Hi Jam,

Here my workflow (the HTTP Request node is “Récupère le workflow”.

And here the full JSON response :

[
{
"data": {
"id": "1",
"name": "Workflow de test",
"active": false,
"nodes": [
{
"parameters": {
},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
320,
380
]
},
{
"parameters": {
"errorMessage": "On a réussi !"
},
"name": "Stop And Error",
"type": "n8n-nodes-base.stopAndError",
"typeVersion": 1,
"position": [
540,
380
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Stop And Error",
"type": "main",
"index": 0
}
]
]
}
},
"createdAt": "2022-03-04T15:09:47.804Z",
"updatedAt": "2022-03-10T21:31:59.225Z",
"settings": {
"timezone": "Europe/Paris",
"saveExecutionProgress": "DEFAULT",
"saveManualExecutions": true
},
"staticData": null,
"tags": [
{
"id": "1",
"name": "work in progress",
"createdAt": "2022-03-10T21:30:55.833Z",
"updatedAt": "2022-03-10T21:30:55.833Z"
}
]
}
},
{
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE",
"cause": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"options": {
}
}
},
{
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE",
"cause": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"options": {
}
}
},
{
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE",
"cause": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"options": {
}
}
},
{
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE",
"cause": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"options": {
}
}
},
{
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE",
"cause": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"options": {
}
}
},
{
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE",
"cause": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"error": {
"code": "ERR_HTTP_INVALID_HEADER_VALUE"
},
"options": {
}
}
}
]

Hey @JulienDelRio, it seems in your second HTTP Request node you are using an expression of {{$node["Authentification"].json["headers"]["set-cookie"]}}.

For the first item it receives it would use the first item from your Authentification node. For the second item it receives it would look up the second item from your Authentification node which most likely doesn’t exist. I reckon if you simply put $item(0) in front of it like {{ $item(0).$node["Authentification"].json["headers"]["set-cookie"]}} (relevant doc), your flow would work.

Thank you very much @MutedJam

It’s fixing my issue.

It’s not answering my question about multi request, but it’s solving by parent issue :smiley: