Describe the problem/error/question
Probably a stupid error but I cant seem to find what is the problem…
my previous node returns the json attached. My problem is that the first value of the “column_values” key can change depending on the item. To counter this I am trying to use jamespath query to always get the “value” of the item that has the “User” value to the “title” key.
To try this I am creating a code node that will return this JSON but when I paste the json I get a syntax error. I solved the quotes inside quotes problem with the \ but are still getting the syntax error on this part.
return [
{ “value”:
“{
"changed_at": "2023-11-06T14:54:07.407Z",
"linkedPulseIds":[{
"linkedPulseId":5393013653}]
}”
}
]
and can’t figure out why.
[
{
“id”: “5458908239”,
“name”: “Weber”,
“created_at”: “2023-11-06T14:53:53Z”,
“state”: “active”,
“column_values”: [
{
“id”: “subitems”,
“text”: “”,
“title”: “Subitems”,
“type”: “subtasks”,
“value”: null,
“additional_info”: null
},
{
“id”: “connect_boards4”,
“text”: “[email protected](A7124)”,
“title”: “User”,
“type”: “board-relation”,
“value”: “{"changed_at":"2023-11-06T14:54:07.407Z","linkedPulseIds":[{"linkedPulseId":5393013653}]}”,
“additional_info”: null
},
{
“id”: “mirror2”,
“text”: “2023-10-28 07:19”,
“title”: “Current Exp Date”,
“type”: “lookup”,
“value”: null,
“additional_info”: null
},
{
“id”: “status_1”,
“text”: “3 days”,
“title”: “Days Added”,
“type”: “color”,
“value”: “{"index":0,"post_id":null,"changed_at":"2023-11-06T14:54:10.307Z"}”,
“additional_info”: “{"label":"3 days","color":"#fdab3d","changed_at":"2023-11-06T14:54:10.307Z"}”
},
{
“id”: “button”,
“text”: “Click me”,
“title”: “Extend Expiration”,
“type”: “button”,
“value”: “{"clicks":1,"changed_at":"2023-11-06T14:54:11.008Z"}”,
“additional_info”: null
},
{
“id”: “status”,
“text”: “Working on it”,
“title”: “Status”,
“type”: “color”,
“value”: “{"index":0,"invalid":false,"changed_at":"2023-11-06T14:54:13.264Z"}”,
“additional_info”: “{"label":"Working on it","color":"#fdab3d","changed_at":"2023-11-06T14:54:13.264Z"}”
},
{
“id”: “creation_log”,
“text”: “2023-11-06 14:53:53 UTC”,
“title”: “Creation Log”,
“type”: “pulse-log”,
“value”: null,
“additional_info”: null
},
{
“id”: “date”,
“text”: “”,
“title”: “Old Exp Date”,
“type”: “date”,
“value”: null,
“additional_info”: null
},
{
“id”: “last_updated”,
“text”: “2023-11-06 14:54:13 UTC”,
“title”: “Last Updated”,
“type”: “pulse-updated”,
“value”: null,
“additional_info”: null
}
]
}
]
What is the error message (if any)?
Please share your workflow
(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
Information on your n8n setup
- n8n version: Cloud 1.14.2
- **Database (default: SQLite): postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: