mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Add resources Task Tag, Space Tag & Task List to ClickUp Node (#1539)
* ⚡ Add resources Task Tag and Space Tag to ClickUp Node * ⚡ Add Task List resource * ⚡ Fix spaceTag:update * ⚡ Fix icon and formatting Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -16,13 +16,15 @@ import {
|
||||
clickupApiRequest,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import { createHmac } from 'crypto';
|
||||
import {
|
||||
createHmac,
|
||||
} from 'crypto';
|
||||
|
||||
export class ClickUpTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'ClickUp Trigger',
|
||||
name: 'clickUpTrigger',
|
||||
icon: 'file:clickup.png',
|
||||
icon: 'file:clickup.svg',
|
||||
group: ['trigger'],
|
||||
version: 1,
|
||||
description: 'Handle ClickUp events via webhooks (Beta)',
|
||||
@@ -302,16 +304,16 @@ export class ClickUpTrigger implements INodeType {
|
||||
body.events = '*';
|
||||
}
|
||||
if (filters.listId) {
|
||||
body.list_id = (filters.listId as string).replace('#','');
|
||||
body.list_id = (filters.listId as string).replace('#', '');
|
||||
}
|
||||
if (filters.taskId) {
|
||||
body.task_id = (filters.taskId as string).replace('#','');
|
||||
body.task_id = (filters.taskId as string).replace('#', '');
|
||||
}
|
||||
if (filters.spaceId) {
|
||||
body.space_id = (filters.spaceId as string).replace('#','');
|
||||
body.space_id = (filters.spaceId as string).replace('#', '');
|
||||
}
|
||||
if (filters.folderId) {
|
||||
body.folder_id = (filters.folderId as string).replace('#','');
|
||||
body.folder_id = (filters.folderId as string).replace('#', '');
|
||||
}
|
||||
const { webhook } = await clickupApiRequest.call(this, 'POST', endpoint, body);
|
||||
webhookData.webhookId = webhook.id;
|
||||
@@ -323,7 +325,7 @@ export class ClickUpTrigger implements INodeType {
|
||||
const endpoint = `/webhook/${webhookData.webhookId}`;
|
||||
try {
|
||||
await clickupApiRequest.call(this, 'DELETE', endpoint);
|
||||
} catch(error) {
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
delete webhookData.webhookId;
|
||||
|
||||
Reference in New Issue
Block a user