Describe the problem/error/question
I have an issue with a single workflow using the HTTP node. I’m able to get a response, but that response data cannot be referenced in any other nodes after the HTTP node. I’ve tried to use the Set node, the Code node, and execute workflow node to see if I can reference this data somehow and it still isn’t referenceable
What is the error message (if any)?
Please share your workflow
Here’s the json data returned from the HTTP Node:
[
{
"id": 586,
"display_name": "John Doe",
"actual_name": "",
"short_name": "JD",
"icon": "",
"team_id": 0,
"is_agent": false,
"is_closed": false,
"is_assigned": true,
"livechat_started": true,
"last_message_id": 8,
"last_update_date": "2023-08-11T15:06:58.2",
"participant_count": 2,
"ticket_id": 0,
"participant_id": 2,
"participant_read_id": 8,
"participant_lastnotification_id": 8,
"unread_count": 0,
"unnotified_count": 0,
"other_participant": {
"id": 1,
"chat_id": 1586,
"agent_id": 0,
"user_id": 0,
"hasleftchat": false,
"anon_connection_id": "noconnection",
"read_id": 8,
"lastnotification_id": 8,
"lcos_id": 41,
"name": "John Doe",
"email": "[email protected]",
"short_name": "JS",
"onlinestatus": -1,
"lastonline": "Last online 45148 days ago",
"teams_conversation_id": ""
},
"flow_step": -9999,
"teams_activity": "",
"teams_conversation_id": ""
}
]
Here’s the HTTP and code node I’m using to reference the data (I’ve used a Set node as well to no avail)
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Here’s what is returned from the Code node:
[
{
"id": 0
}
]
Here’s what is expected to return from the Code node with this sample data (the variables are the same, but the first one checks if the value exists and makes the value 0 if it doesn’t:
[
{
"id": 586,
"checkid": 586
}
]
Information on your n8n setup
- n8n version: 0.225.2
- Database (default: SQLite): MySQL
- n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: Ubuntu 22