I’ve created my first workflow which is getting data from a webhook and creating tasks in clickup. The clickup node has got good parameters to use but I have a question regarding the “Additional fields” when creating the tasks:
“Custom Fields JSON”: I’ve managed to use this but only with static data. Is there a way the value for the field can be taken from a previous node i.e. {{$node["webhook"].json["body"]["key"]}}?
In general, is it possible to add some other additional fields or would that require a change in the clickup node code?
The format is that of a JSON array, so you should be able to add multiple fields using a value like this in the Custom Fields JSON field:
[{
"id": "ID of the first field",
"value": "Value of the first field"
}, {
"id": "ID of the second field",
"value": "Value of the second field"
}, {
"id": "ID of the third field",
"value": "Value of the third field"
}]
How would I add something from a previous node as the value?
e.g. this is the expression for the value from another node: {{$node["Webhook from Barn Website"].json["body"]["submission"]["email-1"]}}
So would the Custom Fields JSON be (using a fictitious id for this example): {"id":"112345678789","value":"{{$node["Webhook from Barn Website"].json["body"]["submission"]["email-1"]}}"}
OK, my bad, I should have followed the correct process
I was adding the JSON directly into the field (by clicking on the field itself).
If I use the gears icon to add an expression (as detailed in the previous post by MutedJam) it works!
It creates the same JSON but must do something in the background to replace the value.
Hi! I am having trouble using this custom fields JSON. Is there a way to confirm the ID of the custom fields? I have done this by using get all tasks via clcikup node, but I keep getting an error message:
NodeOperationError: Custom Fields: Invalid JSON
at Object.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ClickUp/ClickUp.node.js:716:39)
at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:526:37)
at /usr/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:451:62
at processTicksAndRejections (internal/process/task_queues.js:95:5)