@blickwerk/n8n-nodes-microsoft-planner 1.3.8 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -100,6 +100,7 @@ Configure the Microsoft Planner OAuth2 API credentials in n8n:
100
100
  - **Get Many** - Get multiple tasks from a plan or bucket
101
101
  - **Update** - Update an existing task
102
102
  - **Delete** - Delete a task
103
+ - **Get Files** - Get all files attached to a task
103
104
 
104
105
  ## Usage
105
106
 
@@ -147,6 +148,21 @@ To update a task:
147
148
  - Percent Complete
148
149
  - Move to different bucket
149
150
 
151
+ ### Getting Files from a Task
152
+
153
+ To get all files attached to a task:
154
+ 1. Enter the **Task ID** manually
155
+ 2. The operation returns:
156
+ - **taskId**: The task ID
157
+ - **fileCount**: Number of attached files
158
+ - **files**: Array of file objects with:
159
+ - **url**: Decoded SharePoint URL (ready to use)
160
+ - **alias**: Display name of the file
161
+ - **type**: File type (e.g., PowerPoint, Word, Excel, PDF, Other)
162
+ - **previewPriority**: Priority for preview display
163
+ - **lastModifiedDateTime**: When the file reference was last modified
164
+ - **lastModifiedBy**: Who last modified the reference
165
+
150
166
  ### How to Find Plan IDs
151
167
 
152
168
  You can find your Plan ID in several ways:
@@ -182,6 +198,12 @@ Tested with n8n version 1.0.0 and above.
182
198
 
183
199
  ## Version History
184
200
 
201
+ ### 1.3.9
202
+ - **Added Get Files operation**
203
+ - Retrieve all files attached to a task
204
+ - URLs are properly decoded for direct use
205
+ - Returns file metadata including alias, type, and last modified info
206
+
185
207
  ### 1.3.8
186
208
  - **Fixed priority values**
187
209
  - Corrected priority mapping: Urgent (1), Important (3), Medium (5), Low (9)
@@ -317,6 +317,33 @@ class MicrosoftPlanner {
317
317
  });
318
318
  returnData.push({ success: true, taskId });
319
319
  }
320
+ // ----------------------------------
321
+ // task:getFiles
322
+ // ----------------------------------
323
+ if (operation === 'getFiles') {
324
+ const taskIdParam = this.getNodeParameter('taskId', i);
325
+ const taskId = typeof taskIdParam === 'string' ? taskIdParam : taskIdParam.value;
326
+ // Get task details
327
+ const details = await GenericFunctions_1.microsoftApiRequest.call(this, 'GET', `/planner/tasks/${taskId}/details`);
328
+ const references = details.references || {};
329
+ const files = Object.keys(references).map((encodedUrl) => {
330
+ // Decode the URL
331
+ const url = decodeURIComponent(encodedUrl);
332
+ return {
333
+ url,
334
+ alias: references[encodedUrl].alias,
335
+ type: references[encodedUrl].type,
336
+ previewPriority: references[encodedUrl].previewPriority,
337
+ lastModifiedDateTime: references[encodedUrl].lastModifiedDateTime,
338
+ lastModifiedBy: references[encodedUrl].lastModifiedBy,
339
+ };
340
+ });
341
+ returnData.push({
342
+ taskId,
343
+ fileCount: files.length,
344
+ files,
345
+ });
346
+ }
320
347
  }
321
348
  }
322
349
  catch (error) {
@@ -43,6 +43,12 @@ exports.taskOperations = [
43
43
  description: 'Delete a task',
44
44
  action: 'Delete a task',
45
45
  },
46
+ {
47
+ name: 'Get Files',
48
+ value: 'getFiles',
49
+ description: 'Get files attached to a task',
50
+ action: 'Get files from a task',
51
+ },
46
52
  ],
47
53
  default: 'create',
48
54
  },
@@ -438,4 +444,29 @@ exports.taskFields = [
438
444
  },
439
445
  ],
440
446
  },
447
+ // ----------------------------------
448
+ // task:getFiles
449
+ // ----------------------------------
450
+ {
451
+ displayName: 'Task',
452
+ name: 'taskId',
453
+ type: 'resourceLocator',
454
+ default: { mode: 'id', value: '' },
455
+ required: true,
456
+ displayOptions: {
457
+ show: {
458
+ resource: ['task'],
459
+ operation: ['getFiles'],
460
+ },
461
+ },
462
+ modes: [
463
+ {
464
+ displayName: 'By ID',
465
+ name: 'id',
466
+ type: 'string',
467
+ placeholder: 'e.g. rz1EH6N_a0aLpRm-2QifxZgAF5OL',
468
+ },
469
+ ],
470
+ description: 'The Task ID to get files from',
471
+ },
441
472
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blickwerk/n8n-nodes-microsoft-planner",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "n8n node for Microsoft Planner - Create and retrieve tasks",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",