# ClickUp node creates an empty task - JSON.parse expression fails silently

**URL:** <https://community.n8n.io/t/clickup-node-creates-an-empty-task-json-parse-expression-fails-silently/128775>\
**Category:** Questions\
**Created:** [June 7, 2025, 7:59pm UTC](https://community.n8n.io/t/clickup-node-creates-an-empty-task-json-parse-expression-fails-silently/128775 "2025-06-07T19:59:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Relitore](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/relitore/32/88429_2.png) [@Relitore](https://community.n8n.io/u/Relitore)\
**Post date:** [June 7, 2025, 7:59pm UTC](https://community.n8n.io/t/clickup-node-creates-an-empty-task-json-parse-expression-fails-silently/128775/1 "2025-06-07T19:59:45Z")

</div>

`Hi everyone,`

`I'm building my first AI Agent workflow and I'm facing a very strange issue on the final step. I'm really close, but completely stuck!`

`My goal is simple: An AI Agent talks to a user and outputs a JSON string with the collected lead data. The next node, ClickUp, should create a new task with this data.`

`The Problem:` `The workflow runs successfully (all green nodes!), and a task IS created in ClickUp. However, the task is created with empty fields. The static text from my expression (like " **Empresa:**") is written correctly, but the dynamic part`{{ … }}`seems to evaluate to an empty string.`

`I'm using this expression to get the lead's name:` `{{ JSON.parse($json.output).json.dados.nome_lead }}`

`This seems to be a silent failure in the expression engine. I've already tried:` `- Using an Edit Fields node to parse the JSON first (it returned null).` `- Double-checking the data path, which seems correct based on the AI Agent's output.`

`I'm attaching a few screenshots showing the AI Agent's successful JSON output, and the final empty task created in ClickUp.`

`Is this a known bug, or is there a better way to reliably parse a JSON string from a previous node for the ClickUp fields?`

`Thank you so much for any help!`

 ![Captura de tela 2025-06-07 161216](https://europe1.discourse-cdn.com/n8n/original/3X/5/4/5473d1a650e82fc3cbe468d547f01ab3bd8706d1.png)  
 ![Captura de tela 2025-06-07 161144](https://europe1.discourse-cdn.com/n8n/original/3X/3/0/30193c5973fe5eb2b4be53e8088a7fb74cc38daf.png)  
 ![Captura de tela 2025-06-07 161528](https://europe1.discourse-cdn.com/n8n/original/3X/d/8/d865e4acd5d117ae22b9bc49dc93b8b5bc56f3a0.png)

---

<div class="post-metadata">

**Author:** ![barn4k](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/barn4k/32/8170_2.png) [@barn4k](https://community.n8n.io/u/barn4k)\
**Post date:** [June 7, 2025, 8:11pm UTC](https://community.n8n.io/t/clickup-node-creates-an-empty-task-json-parse-expression-fails-silently/128775/2 "2025-06-07T20:11:11Z")

</div>

hello @Relitore

That’s because the `JSON.parse` function fails as you have improper JSON.

You should enable the option “Require specific output format” and specify the JSON schema to output

---

<div class="post-metadata">

**Author:** ![Erick\_Torres](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/erick_torres/32/66408_2.png) [@Erick\_Torres](https://community.n8n.io/u/Erick_Torres)\
**Post date:** [June 7, 2025, 8:15pm UTC](https://community.n8n.io/t/clickup-node-creates-an-empty-task-json-parse-expression-fails-silently/128775/3 "2025-06-07T20:15:39Z")

</div>

Another option is to clean and parse the output after defining the agent’s output. You can use a Set or Code node to convert the output into a real JSON object. For example, in a Code node:

```auto
const raw = $json.output;
// Extract only the valid portion of the JSON
const match = raw.match(/\{[\s\S]*\}/);
if (!match) {
throw new Error("Could not extract valid JSON");
}
const parsed = JSON.parse(match[0]);
return [{ json: parsed }];

```

Then, in ClickUp, access the data directly.  
After that, you can use simple expressions like:

```auto
{{ $json.dados.name_lead }}
{{ $json.dados.name_company }}

```

And they’ll work correctly because you’re no longer trying to JSON.parse(…) a string with double quotes and escaped newlines.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [September 5, 2025, 8:16pm UTC](https://community.n8n.io/t/clickup-node-creates-an-empty-task-json-parse-expression-fails-silently/128775/4 "2025-09-05T20:16:24Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
