diff --git a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts index 128710dd3a..b1833a8e1e 100644 --- a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts +++ b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts @@ -1,7 +1,7 @@ import moment from 'moment-timezone'; import type { - IExecuteFunctions, IDataObject, + IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, @@ -992,7 +992,19 @@ export class ClickUp implements INodeType { } if (operation === 'get') { const taskId = this.getNodeParameter('id', i) as string; - responseData = await clickupApiRequest.call(this, 'GET', `/task/${taskId}`); + const includeSubtasks = this.getNodeParameter('includeSubtasks', i, false) as boolean; + if (includeSubtasks) { + qs.include_subtasks = true; + } + const includeMarkdownDescription = this.getNodeParameter( + 'includeMarkdownDescription', + i, + false, + ) as boolean; + if (includeMarkdownDescription) { + qs.include_markdown_description = true; + } + responseData = await clickupApiRequest.call(this, 'GET', `/task/${taskId}`, {}, qs); } if (operation === 'getAll') { const returnAll = this.getNodeParameter('returnAll', i); diff --git a/packages/nodes-base/nodes/ClickUp/TaskDescription.ts b/packages/nodes-base/nodes/ClickUp/TaskDescription.ts index b62fa8b57a..a91188eecd 100644 --- a/packages/nodes-base/nodes/ClickUp/TaskDescription.ts +++ b/packages/nodes-base/nodes/ClickUp/TaskDescription.ts @@ -457,6 +457,33 @@ export const taskFields: INodeProperties[] = [ }, }, }, + { + displayName: 'Include Subtasks', + name: 'includeSubtasks', + type: 'boolean', + default: false, + description: 'Whether to also fetch and include subtasks for this task', + displayOptions: { + show: { + resource: ['task'], + operation: ['get'], + }, + }, + }, + { + displayName: 'Include Markdown Description', + name: 'includeMarkdownDescription', + type: 'boolean', + default: false, + description: + 'Whether to include the markdown_description field in the response. This is important for preserving links in the description.', + displayOptions: { + show: { + resource: ['task'], + operation: ['get'], + }, + }, + }, /* -------------------------------------------------------------------------- */ /* task:getAll */