first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled

This commit is contained in:
2026-03-17 16:22:57 +03:30
commit 3d5eaf9445
15349 changed files with 2847338 additions and 0 deletions
@@ -0,0 +1,27 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, channel => create', () => {
nock('https://graph.microsoft.com')
.post('/v1.0/teams/1644e7fe-547e-4223-a24f-922395865343/channels')
.reply(200, {
'@odata.context':
"https://graph.microsoft.com/v1.0/$metadata#teams('1644e7fe-547e-4223-a24f-922395865343')/channels/$entity",
id: '19:16259efabba44a66916d91dd91862a6f@thread.tacv2',
createdDateTime: '2023-10-26T05:37:43.4798824Z',
displayName: 'New Channel',
description: 'new channel description',
isFavoriteByDefault: null,
email: '',
webUrl:
'https://teams.microsoft.com/l/channel/19%3a16259efabba44a66916d91dd91862a6f%40thread.tacv2/New+Channel?groupId=1644e7fe-547e-4223-a24f-922395865343&tenantId=tenantId-111-222-333',
membershipType: 'private',
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['create.workflow.json'],
});
});
@@ -0,0 +1,107 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"teamId": {
"__rl": true,
"value": "1644e7fe-547e-4223-a24f-922395865343",
"mode": "list",
"cachedResultName": "5w1hb7"
},
"name": "New Channel",
"options": {
"description": "new channel description",
"type": "private"
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('1644e7fe-547e-4223-a24f-922395865343')/channels/$entity",
"id": "19:16259efabba44a66916d91dd91862a6f@thread.tacv2",
"createdDateTime": "2023-10-26T05:37:43.4798824Z",
"displayName": "New Channel",
"description": "new channel description",
"isFavoriteByDefault": null,
"email": "",
"webUrl": "https://teams.microsoft.com/l/channel/19%3a16259efabba44a66916d91dd91862a6f%40thread.tacv2/New+Channel?groupId=1644e7fe-547e-4223-a24f-922395865343&tenantId=tenantId-111-222-333",
"membershipType": "private"
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "ec0b4e3d-2fd7-4fac-90e5-f18ecd620a8f",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,17 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, channel => deleteChannel', () => {
nock('https://graph.microsoft.com')
.delete(
'/v1.0/teams/1644e7fe-547e-4223-a24f-922395865343/channels/19:16259efabba44a66916d91dd91862a6f@thread.tacv2',
)
.reply(200, {});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['deleteChannel.workflow.json'],
});
});
@@ -0,0 +1,102 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"operation": "deleteChannel",
"teamId": {
"__rl": true,
"value": "1644e7fe-547e-4223-a24f-922395865343",
"mode": "list",
"cachedResultName": "5w1hb7"
},
"channelId": {
"__rl": true,
"value": "19:16259efabba44a66916d91dd91862a6f@thread.tacv2",
"mode": "list",
"cachedResultName": "New Channel",
"cachedResultUrl": "https://teams.microsoft.com/l/channel/19%3A16259efabba44a66916d91dd91862a6f%40thread.tacv2/New%20Channel?groupId=1644e7fe-547e-4223-a24f-922395865343&tenantId=tenantId-111-222-333&allowXTenantAccess=False"
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"success": true
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "fb9028a2-b502-45f1-b907-825e8d754991",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,30 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, channel => get', () => {
nock('https://graph.microsoft.com')
.get(
'/v1.0/teams/e25bae35-7bcc-4fb7-b4f2-0d5caef251fd/channels/19:dff84a49e5124cc89dff0192c621ea0f@thread.tacv2',
)
.reply(200, {
'@odata.context':
"https://graph.microsoft.com/v1.0/$metadata#teams('e25bae35-7bcc-4fb7-b4f2-0d5caef251fd')/channels/$entity",
id: '19:dff84a49e5124cc89dff0192c621ea0f@thread.tacv2',
createdDateTime: '2022-03-26T17:16:51Z',
displayName: 'General',
description: 'Description of Retail',
isFavoriteByDefault: null,
email: 'Retail@5w1hb7.onmicrosoft.com',
tenantId: 'tenantId-111-222-333',
webUrl:
'https://teams.microsoft.com/l/channel/19%3Adff84a49e5124cc89dff0192c621ea0f%40thread.tacv2/General?groupId=e25bae35-7bcc-4fb7-b4f2-0d5caef251fd&tenantId=tenantId-111-222-333&allowXTenantAccess=True',
membershipType: 'standard',
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['get.workflow.json'],
});
});
@@ -0,0 +1,111 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"operation": "get",
"teamId": {
"__rl": true,
"value": "e25bae35-7bcc-4fb7-b4f2-0d5caef251fd",
"mode": "list",
"cachedResultName": "Retail"
},
"channelId": {
"__rl": true,
"value": "19:dff84a49e5124cc89dff0192c621ea0f@thread.tacv2",
"mode": "list",
"cachedResultName": "General",
"cachedResultUrl": "https://teams.microsoft.com/l/channel/19%3Adff84a49e5124cc89dff0192c621ea0f%40thread.tacv2/Retail?groupId=e25bae35-7bcc-4fb7-b4f2-0d5caef251fd&tenantId=tenantId-111-222-333&allowXTenantAccess=False"
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('e25bae35-7bcc-4fb7-b4f2-0d5caef251fd')/channels/$entity",
"id": "19:dff84a49e5124cc89dff0192c621ea0f@thread.tacv2",
"createdDateTime": "2022-03-26T17:16:51Z",
"displayName": "General",
"description": "Description of Retail",
"isFavoriteByDefault": null,
"email": "Retail@5w1hb7.onmicrosoft.com",
"tenantId": "tenantId-111-222-333",
"webUrl": "https://teams.microsoft.com/l/channel/19%3Adff84a49e5124cc89dff0192c621ea0f%40thread.tacv2/General?groupId=e25bae35-7bcc-4fb7-b4f2-0d5caef251fd&tenantId=tenantId-111-222-333&allowXTenantAccess=True",
"membershipType": "standard"
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "021e8e46-fd28-4dfb-bd94-b288a8541940",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,54 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, channel => getAll', () => {
nock('https://graph.microsoft.com')
.get('/v1.0/teams/1111-2222-3333/channels')
.reply(200, {
value: [
{
id: '42:aaabbbccc.tacv2',
createdDateTime: '2022-03-26T17:18:33Z',
displayName: 'Sales West',
description: 'Description of Sales West',
isFavoriteByDefault: null,
email: null,
tenantId: 'tenantId-111-222-333',
webUrl:
'https://teams.microsoft.com/l/channel/threadId/Sales%20West?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False',
membershipType: 'standard',
},
{
id: '19:8662cdf2d8ff49eabdcf6364bc0fe3a2@thread.tacv2',
createdDateTime: '2022-03-26T17:18:30Z',
displayName: 'Sales East',
description: 'Description of Sales West',
isFavoriteByDefault: null,
email: null,
tenantId: 'tenantId-111-222-333',
webUrl:
'https://teams.microsoft.com/l/channel/19%3A8662cdf2d8ff49eabdcf6364bc0fe3a2%40thread.tacv2/Sales%20East?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False',
membershipType: 'standard',
},
{
id: '19:a95209ede91f4d5595ac944aeb172124@thread.tacv2',
createdDateTime: '2022-03-26T17:18:16Z',
displayName: 'General',
description: 'Description of U.S. Sales',
isFavoriteByDefault: null,
email: 'U.S.Sales@5w1hb7.onmicrosoft.com',
tenantId: 'tenantId-111-222-333',
webUrl:
'https://teams.microsoft.com/l/channel/19%3Aa95209ede91f4d5595ac944aeb172124%40thread.tacv2/U.S.%20Sales?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False',
membershipType: 'standard',
},
],
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['getAll.workflow.json'],
});
});
@@ -0,0 +1,129 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"operation": "getAll",
"teamId": {
"__rl": true,
"value": "1111-2222-3333",
"mode": "list",
"cachedResultName": "U.S. Sales"
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"id": "42:aaabbbccc.tacv2",
"createdDateTime": "2022-03-26T17:18:33Z",
"displayName": "Sales West",
"description": "Description of Sales West",
"isFavoriteByDefault": null,
"email": null,
"tenantId": "tenantId-111-222-333",
"webUrl": "https://teams.microsoft.com/l/channel/threadId/Sales%20West?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False",
"membershipType": "standard"
}
},
{
"json": {
"id": "19:8662cdf2d8ff49eabdcf6364bc0fe3a2@thread.tacv2",
"createdDateTime": "2022-03-26T17:18:30Z",
"displayName": "Sales East",
"description": "Description of Sales West",
"isFavoriteByDefault": null,
"email": null,
"tenantId": "tenantId-111-222-333",
"webUrl": "https://teams.microsoft.com/l/channel/19%3A8662cdf2d8ff49eabdcf6364bc0fe3a2%40thread.tacv2/Sales%20East?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False",
"membershipType": "standard"
}
},
{
"json": {
"id": "19:a95209ede91f4d5595ac944aeb172124@thread.tacv2",
"createdDateTime": "2022-03-26T17:18:16Z",
"displayName": "General",
"description": "Description of U.S. Sales",
"isFavoriteByDefault": null,
"email": "U.S.Sales@5w1hb7.onmicrosoft.com",
"tenantId": "tenantId-111-222-333",
"webUrl": "https://teams.microsoft.com/l/channel/19%3Aa95209ede91f4d5595ac944aeb172124%40thread.tacv2/U.S.%20Sales?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False",
"membershipType": "standard"
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "08f365b7-a03d-4d38-979e-edca8194d045",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,18 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, channel => update', () => {
nock('https://graph.microsoft.com')
.patch(
'/v1.0/teams/e25bae35-7bcc-4fb7-b4f2-0d5caef251fd/channels/19:b9daa3647ff8450bacaf39490d3e05e2@thread.tacv2',
{ description: 'new channel description', displayName: 'New Deals' },
)
.reply(200, {});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['update.workflow.json'],
});
});
@@ -0,0 +1,106 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"operation": "update",
"teamId": {
"__rl": true,
"value": "e25bae35-7bcc-4fb7-b4f2-0d5caef251fd",
"mode": "list",
"cachedResultName": "Retail"
},
"channelId": {
"__rl": true,
"value": "19:b9daa3647ff8450bacaf39490d3e05e2@thread.tacv2",
"mode": "list",
"cachedResultName": "Deals",
"cachedResultUrl": "https://teams.microsoft.com/l/channel/19%3Ab9daa3647ff8450bacaf39490d3e05e2%40thread.tacv2/Deals?groupId=e25bae35-7bcc-4fb7-b4f2-0d5caef251fd&tenantId=tenantId-111-222-333&allowXTenantAccess=False"
},
"name": "New Deals",
"options": {
"description": "new channel description"
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"success": true
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "75151dab-2cd1-42ee-9a01-e61cf6a1245e",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,59 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, channelMessage => create', () => {
nock('https://graph.microsoft.com')
.post('/beta/teams/1111-2222-3333/channels/42:aaabbbccc.tacv2/messages', {
body: { content: 'new sale', contentType: 'html' },
})
.reply(200, {
'@odata.context':
"https://graph.microsoft.com/beta/$metadata#teams('1111-2222-3333')/channels('threadId')/messages/$entity",
id: '1698324478896',
replyToId: null,
etag: '1698324478896',
messageType: 'message',
createdDateTime: '2023-10-26T12:47:58.896Z',
lastModifiedDateTime: '2023-10-26T12:47:58.896Z',
lastEditedDateTime: null,
deletedDateTime: null,
subject: null,
summary: null,
chatId: null,
importance: 'normal',
locale: 'en-us',
webUrl:
'https://teams.microsoft.com/l/message/threadId/1698324478896?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&createdTime=1698324478896&parentMessageId=1698324478896',
onBehalfOf: null,
policyViolation: null,
eventDetail: null,
from: {
application: null,
device: null,
user: {
'@odata.type': '#microsoft.graph.teamworkUserIdentity',
id: '11111-2222-3333',
displayName: 'My Name',
userIdentityType: 'aadUser',
},
},
body: {
contentType: 'html',
content: 'new sale',
},
channelIdentity: {
teamId: '1111-2222-3333',
channelId: '42:aaabbbccc.tacv2',
},
attachments: [],
mentions: [],
reactions: [],
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['create.workflow.json'],
});
});
@@ -0,0 +1,145 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "channelMessage",
"teamId": {
"__rl": true,
"value": "1111-2222-3333",
"mode": "list",
"cachedResultName": "U.S. Sales"
},
"channelId": {
"__rl": true,
"value": "42:aaabbbccc.tacv2",
"mode": "list",
"cachedResultName": "Sales West",
"cachedResultUrl": "https://teams.microsoft.com/l/channel/threadId/Sales%20West?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False"
},
"contentType": "html",
"message": "new sale",
"options": {
"includeLinkToWorkflow": false
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.context": "https://graph.microsoft.com/beta/$metadata#teams('1111-2222-3333')/channels('threadId')/messages/$entity",
"id": "1698324478896",
"replyToId": null,
"etag": "1698324478896",
"messageType": "message",
"createdDateTime": "2023-10-26T12:47:58.896Z",
"lastModifiedDateTime": "2023-10-26T12:47:58.896Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"chatId": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "https://teams.microsoft.com/l/message/threadId/1698324478896?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&createdTime=1698324478896&parentMessageId=1698324478896",
"onBehalfOf": null,
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "11111-2222-3333",
"displayName": "My Name",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "html",
"content": "new sale"
},
"channelIdentity": {
"teamId": "1111-2222-3333",
"channelId": "42:aaabbbccc.tacv2"
},
"attachments": [],
"mentions": [],
"reactions": []
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "30cec397-a737-41b8-8da2-dff4d293ce70",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,71 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, channelMessage => getAll', () => {
nock('https://graph.microsoft.com')
.get('/beta/teams/1111-2222-3333/channels/42:aaabbbccc.tacv2/messages')
.reply(200, {
value: [
{
id: '1698130964682',
replyToId: null,
etag: '1698130964682',
messageType: 'message',
createdDateTime: '2023-10-24T07:02:44.682Z',
lastModifiedDateTime: '2023-10-24T07:02:44.682Z',
lastEditedDateTime: null,
deletedDateTime: null,
subject: '',
summary: null,
chatId: null,
importance: 'normal',
locale: 'en-us',
webUrl:
'https://teams.microsoft.com/l/message/threadId/1698130964682?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&createdTime=1698130964682&parentMessageId=1698130964682',
onBehalfOf: null,
policyViolation: null,
eventDetail: null,
from: {
application: null,
device: null,
user: {
'@odata.type': '#microsoft.graph.teamworkUserIdentity',
id: '11111-2222-3333',
displayName: 'My Name',
userIdentityType: 'aadUser',
tenantId: 'tenantId-111-222-333',
},
},
body: {
contentType: 'html',
content:
'<div>I added a tab at the top of this channel. Check it out!</div><attachment id="tab::f22a0494-6f7c-4512-85c5-e4ce72ce142a"></attachment>',
},
channelIdentity: {
teamId: '1111-2222-3333',
channelId: '42:aaabbbccc.tacv2',
},
attachments: [
{
id: 'tab::f22a0494-6f7c-4512-85c5-e4ce72ce142a',
contentType: 'tabReference',
contentUrl: null,
content: null,
name: 'Tasks',
thumbnailUrl: null,
teamsAppId: null,
},
],
mentions: [],
reactions: [],
},
],
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['getAll.workflow.json'],
});
});
@@ -0,0 +1,152 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "channelMessage",
"operation": "getAll",
"teamId": {
"__rl": true,
"value": "1111-2222-3333",
"mode": "list",
"cachedResultName": "U.S. Sales"
},
"channelId": {
"__rl": true,
"value": "42:aaabbbccc.tacv2",
"mode": "list",
"cachedResultName": "Sales West",
"cachedResultUrl": "https://teams.microsoft.com/l/channel/threadId/Sales%20West?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&allowXTenantAccess=False"
},
"returnAll": true
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"id": "1698130964682",
"replyToId": null,
"etag": "1698130964682",
"messageType": "message",
"createdDateTime": "2023-10-24T07:02:44.682Z",
"lastModifiedDateTime": "2023-10-24T07:02:44.682Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": "",
"summary": null,
"chatId": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "https://teams.microsoft.com/l/message/threadId/1698130964682?groupId=1111-2222-3333&tenantId=tenantId-111-222-333&createdTime=1698130964682&parentMessageId=1698130964682",
"onBehalfOf": null,
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "11111-2222-3333",
"displayName": "My Name",
"userIdentityType": "aadUser",
"tenantId": "tenantId-111-222-333"
}
},
"body": {
"contentType": "html",
"content": "<div>I added a tab at the top of this channel. Check it out!</div><attachment id=\"tab::f22a0494-6f7c-4512-85c5-e4ce72ce142a\"></attachment>"
},
"channelIdentity": {
"teamId": "1111-2222-3333",
"channelId": "42:aaabbbccc.tacv2"
},
"attachments": [
{
"id": "tab::f22a0494-6f7c-4512-85c5-e4ce72ce142a",
"contentType": "tabReference",
"contentUrl": null,
"content": null,
"name": "Tasks",
"thumbnailUrl": null,
"teamsAppId": null
}
],
"mentions": [],
"reactions": []
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "d89de79a-1819-4d29-b781-a1f3f00b4a2e",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,53 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, chatMessage => create', () => {
nock('https://graph.microsoft.com')
.post('/v1.0/chats/19:ebed9ad42c904d6c83adf0db360053ec@thread.v2/messages')
.reply(200, {
'@odata.context':
"https://graph.microsoft.com/v1.0/$metadata#chats('19%3Aebed9ad42c904d6c83adf0db360053ec%40thread.v2')/messages/$entity",
id: '1698378560692',
replyToId: null,
etag: '1698378560692',
messageType: 'message',
createdDateTime: '2023-10-27T03:49:20.692Z',
lastModifiedDateTime: '2023-10-27T03:49:20.692Z',
lastEditedDateTime: null,
deletedDateTime: null,
subject: null,
summary: null,
chatId: '19:ebed9ad42c904d6c83adf0db360053ec@thread.v2',
importance: 'normal',
locale: 'en-us',
webUrl: null,
channelIdentity: null,
policyViolation: null,
eventDetail: null,
from: {
application: null,
device: null,
user: {
'@odata.type': '#microsoft.graph.teamworkUserIdentity',
id: '11111-2222-3333',
displayName: 'Michael Kret',
userIdentityType: 'aadUser',
},
},
body: {
contentType: 'html',
content:
'Hello!<br>\n<br>\n<em> Powered by <a href="http://localhost:5678/workflow/i3NYGF0LXV4qDFV9?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363">this n8n workflow</a> </em>',
},
attachments: [],
mentions: [],
reactions: [],
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['create.workflow.json'],
});
});
@@ -0,0 +1,134 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "chatMessage",
"chatId": {
"__rl": true,
"value": "19:ebed9ad42c904d6c83adf0db360053ec@thread.v2",
"mode": "list",
"cachedResultName": "Grady Archie, Adele Vance, Henrietta Mueller, Patti Fernandez, Diego Siciliani, Michael Kret (group)",
"cachedResultUrl": "https://teams.microsoft.com/l/chat/19%3Aebed9ad42c904d6c83adf0db360053ec%40thread.v2/0?tenantId=23786ca6-7ff2-4672-87d0-5c649ee0a337"
},
"message": "Hello!",
"options": {
"includeLinkToWorkflow": true
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3Aebed9ad42c904d6c83adf0db360053ec%40thread.v2')/messages/$entity",
"id": "1698378560692",
"replyToId": null,
"etag": "1698378560692",
"messageType": "message",
"createdDateTime": "2023-10-27T03:49:20.692Z",
"lastModifiedDateTime": "2023-10-27T03:49:20.692Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"chatId": "19:ebed9ad42c904d6c83adf0db360053ec@thread.v2",
"importance": "normal",
"locale": "en-us",
"webUrl": null,
"channelIdentity": null,
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "11111-2222-3333",
"displayName": "Michael Kret",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "html",
"content": "Hello!<br>\n<br>\n<em> Powered by <a href=\"http://localhost:5678/workflow/i3NYGF0LXV4qDFV9?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363\">this n8n workflow</a> </em>"
},
"attachments": [],
"mentions": [],
"reactions": []
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "4b3813fc-dee5-4560-becc-9e2c7fe881d6",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,54 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, chatMessage => get', () => {
nock('https://graph.microsoft.com')
.get('/v1.0/chats/19:ebed9ad42c904d6c83adf0db360053ec@thread.v2/messages/1698378560692')
.reply(200, {
'@odata.context':
"https://graph.microsoft.com/v1.0/$metadata#chats('19%3Aebed9ad42c904d6c83adf0db360053ec%40thread.v2')/messages/$entity",
id: '1698378560692',
replyToId: null,
etag: '1698378560692',
messageType: 'message',
createdDateTime: '2023-10-27T03:49:20.692Z',
lastModifiedDateTime: '2023-10-27T03:49:20.692Z',
lastEditedDateTime: null,
deletedDateTime: null,
subject: null,
summary: null,
chatId: '19:ebed9ad42c904d6c83adf0db360053ec@thread.v2',
importance: 'normal',
locale: 'en-us',
webUrl: null,
channelIdentity: null,
policyViolation: null,
eventDetail: null,
from: {
application: null,
device: null,
user: {
'@odata.type': '#microsoft.graph.teamworkUserIdentity',
id: '11111-2222-3333',
displayName: 'Michael Kret',
userIdentityType: 'aadUser',
tenantId: '23786ca6-7ff2-4672-87d0-5c649ee0a337',
},
},
body: {
contentType: 'html',
content:
'Hello!<br>\n<br>\n<em> Powered by <a href="http://localhost:5678/workflow/i3NYGF0LXV4qDFV9?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363">this n8n workflow</a> </em>',
},
attachments: [],
mentions: [],
reactions: [],
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['get.workflow.json'],
});
});
@@ -0,0 +1,133 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "chatMessage",
"operation": "get",
"chatId": {
"__rl": true,
"value": "19:ebed9ad42c904d6c83adf0db360053ec@thread.v2",
"mode": "list",
"cachedResultName": "Grady Archie, Adele Vance, Henrietta Mueller, Patti Fernandez, Diego Siciliani, Michael Kret (group)",
"cachedResultUrl": "https://teams.microsoft.com/l/chat/19%3Aebed9ad42c904d6c83adf0db360053ec%40thread.v2/0?tenantId=23786ca6-7ff2-4672-87d0-5c649ee0a337"
},
"messageId": "1698378560692"
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3Aebed9ad42c904d6c83adf0db360053ec%40thread.v2')/messages/$entity",
"id": "1698378560692",
"replyToId": null,
"etag": "1698378560692",
"messageType": "message",
"createdDateTime": "2023-10-27T03:49:20.692Z",
"lastModifiedDateTime": "2023-10-27T03:49:20.692Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"chatId": "19:ebed9ad42c904d6c83adf0db360053ec@thread.v2",
"importance": "normal",
"locale": "en-us",
"webUrl": null,
"channelIdentity": null,
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "11111-2222-3333",
"displayName": "Michael Kret",
"userIdentityType": "aadUser",
"tenantId": "23786ca6-7ff2-4672-87d0-5c649ee0a337"
}
},
"body": {
"contentType": "html",
"content": "Hello!<br>\n<br>\n<em> Powered by <a href=\"http://localhost:5678/workflow/i3NYGF0LXV4qDFV9?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363\">this n8n workflow</a> </em>"
},
"attachments": [],
"mentions": [],
"reactions": []
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "4de0815e-b1b7-463a-a627-c55ac71b70e4",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,94 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, chatMessage => getAll', () => {
nock('https://graph.microsoft.com')
.get('/v1.0/chats/19:ebed9ad42c904d6c83adf0db360053ec@thread.v2/messages')
.reply(200, {
value: [
{
id: '1698378560692',
replyToId: null,
etag: '1698378560692',
messageType: 'message',
createdDateTime: '2023-10-27T03:49:20.692Z',
lastModifiedDateTime: '2023-10-27T03:49:20.692Z',
lastEditedDateTime: null,
deletedDateTime: null,
subject: null,
summary: null,
chatId: '19:ebed9ad42c904d6c83adf0db360053ec@thread.v2',
importance: 'normal',
locale: 'en-us',
webUrl: null,
channelIdentity: null,
policyViolation: null,
eventDetail: null,
from: {
application: null,
device: null,
user: {
'@odata.type': '#microsoft.graph.teamworkUserIdentity',
id: '11111-2222-3333',
displayName: 'Michael Kret',
userIdentityType: 'aadUser',
tenantId: '23786ca6-7ff2-4672-87d0-5c649ee0a337',
},
},
body: {
contentType: 'html',
content:
'Hello!<br>\n<br>\n<em> Powered by <a href="http://localhost:5678/workflow/i3NYGF0LXV4qDFV9?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363">this n8n workflow</a> </em>',
},
attachments: [],
mentions: [],
reactions: [],
},
{
id: '1698129297101',
replyToId: null,
etag: '1698129297101',
messageType: 'message',
createdDateTime: '2023-10-24T06:34:57.101Z',
lastModifiedDateTime: '2023-10-24T06:34:57.101Z',
lastEditedDateTime: null,
deletedDateTime: null,
subject: null,
summary: null,
chatId: '19:ebed9ad42c904d6c83adf0db360053ec@thread.v2',
importance: 'normal',
locale: 'en-us',
webUrl: null,
channelIdentity: null,
policyViolation: null,
eventDetail: null,
from: {
application: null,
device: null,
user: {
'@odata.type': '#microsoft.graph.teamworkUserIdentity',
id: '11111-2222-3333',
displayName: 'Michael Kret',
userIdentityType: 'aadUser',
tenantId: '23786ca6-7ff2-4672-87d0-5c649ee0a337',
},
},
body: {
contentType: 'html',
content:
'tada<br>\n<br>\n<em> Powered by <a href="http://localhost:5678/workflow/5sTm8tp3j3niFewr?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363">this n8n workflow</a> </em>',
},
attachments: [],
mentions: [],
reactions: [],
},
],
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['getAll.workflow.json'],
});
});
@@ -0,0 +1,171 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "chatMessage",
"operation": "getAll",
"chatId": {
"__rl": true,
"value": "19:ebed9ad42c904d6c83adf0db360053ec@thread.v2",
"mode": "list",
"cachedResultName": "Grady Archie, Adele Vance, Henrietta Mueller, Patti Fernandez, Diego Siciliani, Michael Kret (group)",
"cachedResultUrl": "https://teams.microsoft.com/l/chat/19%3Aebed9ad42c904d6c83adf0db360053ec%40thread.v2/0?tenantId=23786ca6-7ff2-4672-87d0-5c649ee0a337"
},
"limit": 2
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"id": "1698378560692",
"replyToId": null,
"etag": "1698378560692",
"messageType": "message",
"createdDateTime": "2023-10-27T03:49:20.692Z",
"lastModifiedDateTime": "2023-10-27T03:49:20.692Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"chatId": "19:ebed9ad42c904d6c83adf0db360053ec@thread.v2",
"importance": "normal",
"locale": "en-us",
"webUrl": null,
"channelIdentity": null,
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "11111-2222-3333",
"displayName": "Michael Kret",
"userIdentityType": "aadUser",
"tenantId": "23786ca6-7ff2-4672-87d0-5c649ee0a337"
}
},
"body": {
"contentType": "html",
"content": "Hello!<br>\n<br>\n<em> Powered by <a href=\"http://localhost:5678/workflow/i3NYGF0LXV4qDFV9?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363\">this n8n workflow</a> </em>"
},
"attachments": [],
"mentions": [],
"reactions": []
}
},
{
"json": {
"id": "1698129297101",
"replyToId": null,
"etag": "1698129297101",
"messageType": "message",
"createdDateTime": "2023-10-24T06:34:57.101Z",
"lastModifiedDateTime": "2023-10-24T06:34:57.101Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"chatId": "19:ebed9ad42c904d6c83adf0db360053ec@thread.v2",
"importance": "normal",
"locale": "en-us",
"webUrl": null,
"channelIdentity": null,
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "11111-2222-3333",
"displayName": "Michael Kret",
"userIdentityType": "aadUser",
"tenantId": "23786ca6-7ff2-4672-87d0-5c649ee0a337"
}
},
"body": {
"contentType": "html",
"content": "tada<br>\n<br>\n<em> Powered by <a href=\"http://localhost:5678/workflow/5sTm8tp3j3niFewr?utm_source=n8n-internal&amp;utm_medium=powered_by&amp;utm_campaign=n8n-nodes-base.microsoftTeams_b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363\">this n8n workflow</a> </em>"
},
"attachments": [],
"mentions": [],
"reactions": []
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "324b8a88-47a1-453e-906f-79f9be836e17",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,70 @@
import type { MockProxy } from 'jest-mock-extended';
import { mock } from 'jest-mock-extended';
import { SEND_AND_WAIT_OPERATION, type IExecuteFunctions, type INode } from 'n8n-workflow';
import { versionDescription } from '../../../../v2/actions/versionDescription';
import { MicrosoftTeamsV2 } from '../../../../v2/MicrosoftTeamsV2.node';
import * as transport from '../../../../v2/transport';
jest.mock('../../../../v2/transport', () => {
const originalModule = jest.requireActual('../../../../v2/transport');
return {
...originalModule,
microsoftApiRequest: jest.fn(),
};
});
describe('Test MicrosoftTeamsV2, chatMessage => sendAndWait', () => {
let microsoftTeamsV2: MicrosoftTeamsV2;
let mockExecuteFunctions: MockProxy<IExecuteFunctions>;
beforeEach(() => {
microsoftTeamsV2 = new MicrosoftTeamsV2(versionDescription);
mockExecuteFunctions = mock<IExecuteFunctions>();
});
afterEach(() => {
jest.clearAllMocks();
});
it('should send message and put execution to wait', async () => {
const items = [{ json: { data: 'test' } }];
mockExecuteFunctions.getNodeParameter.mockImplementation((key: string) => {
if (key === 'operation') return SEND_AND_WAIT_OPERATION;
if (key === 'resource') return 'chatMessage';
if (key === 'chatId') return 'chatID';
if (key === 'message') return 'my message';
if (key === 'subject') return '';
if (key === 'approvalOptions.values') return {};
if (key === 'responseType') return 'approval';
if (key === 'options.limitWaitTime.values') return {};
});
mockExecuteFunctions.putExecutionToWait.mockImplementation();
mockExecuteFunctions.getInputData.mockReturnValue(items);
mockExecuteFunctions.getInstanceId.mockReturnValue('instanceId');
mockExecuteFunctions.getNode.mockReturnValue(mock<INode>({ typeVersion: 2 }));
mockExecuteFunctions.getSignedResumeUrl.mockReturnValue(
'http://localhost/waiting-webhook/nodeID?approved=true&signature=abc',
);
const result = await microsoftTeamsV2.execute.call(mockExecuteFunctions);
expect(result).toEqual([items]);
expect(transport.microsoftApiRequest).toHaveBeenCalledTimes(1);
expect(mockExecuteFunctions.putExecutionToWait).toHaveBeenCalledTimes(1);
expect(transport.microsoftApiRequest).toHaveBeenCalledWith(
'POST',
'/v1.0/chats/chatID/messages',
{
body: {
content:
'my message<br><br><a href="http://localhost/waiting-webhook/nodeID?approved=true&signature=abc">Approve</a><br><br><em>This message was sent automatically with <a href="https://n8n.io/?utm_source=n8n-internal&utm_medium=powered_by&utm_campaign=n8n-nodes-base.microsoftTeams_instanceId">n8n</a></em>',
contentType: 'html',
},
},
);
});
});
@@ -0,0 +1,77 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, task => create', () => {
nock('https://graph.microsoft.com')
.post('/v1.0/planner/tasks', {
assignments: {
'ba4a422e-bdce-4795-b4b6-579287363f0e': {
'@odata.type': 'microsoft.graph.plannerAssignment',
orderHint: ' !',
},
},
bucketId: 'CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m',
dueDateTime: '2023-10-30T22:00:00.000Z',
percentComplete: 25,
planId: 'THwgIivuyU26ki8qS7ufcJgAB6zf',
title: 'do this',
})
.reply(200, {
'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#planner/tasks/$entity',
'@odata.etag': 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc="',
planId: 'THwgIivuyU26ki8qS7ufcJgAB6zf',
bucketId: 'CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m',
title: 'do this',
orderHint: '8584964728139267910',
assigneePriority: '',
percentComplete: 25,
startDateTime: null,
createdDateTime: '2024-01-13T08:21:11.5507897Z',
dueDateTime: '2023-10-30T22:00:00Z',
hasDescription: false,
previewType: 'automatic',
completedDateTime: null,
completedBy: null,
referenceCount: 0,
checklistItemCount: 0,
activeChecklistItemCount: 0,
conversationThreadId: null,
priority: 5,
id: 'mYxTKaD9VkqWaBCJE5v4E5gAHcPB',
createdBy: {
user: {
displayName: null,
id: 'b834447b-6848-4af9-8390-d2259ce46b74',
},
application: {
displayName: null,
id: '66bdd989-4a29-465d-86fb-d94ed8fd86ed',
},
},
appliedCategories: {},
assignments: {
'ba4a422e-bdce-4795-b4b6-579287363f0e': {
'@odata.type': '#microsoft.graph.plannerAssignment',
assignedDateTime: '2024-01-13T08:21:11.5507897Z',
orderHint: '8584964728740986700PZ',
assignedBy: {
user: {
displayName: null,
id: 'b834447b-6848-4af9-8390-d2259ce46b74',
},
application: {
displayName: null,
id: '66bdd989-4a29-465d-86fb-d94ed8fd86ed',
},
},
},
},
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['create.workflow.json'],
});
});
@@ -0,0 +1,167 @@
{
"name": "My workflow 69",
"nodes": [
{
"parameters": {},
"id": "28f1f78e-0d50-4bfe-aa16-1a53f0832793",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
520,
300
]
},
{
"parameters": {
"resource": "task",
"groupId": {
"__rl": true,
"value": "1644e7fe-547e-4223-a24f-922395865343",
"mode": "list",
"cachedResultName": "5w1hb7"
},
"planId": {
"__rl": true,
"value": "THwgIivuyU26ki8qS7ufcJgAB6zf",
"mode": "list",
"cachedResultName": "my best plan"
},
"bucketId": {
"__rl": true,
"value": "CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m",
"mode": "list",
"cachedResultName": "To do"
},
"title": "do this",
"options": {
"assignedTo": {
"__rl": true,
"value": "ba4a422e-bdce-4795-b4b6-579287363f0e",
"mode": "list",
"cachedResultName": "Henrietta Mueller"
},
"dueDateTime": "2023-10-30T22:00:00.000Z",
"percentComplete": 25
}
},
"id": "e1c2eafd-4a1e-48aa-bc0e-d5a03644fedc",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
740,
300
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "a05a3079-3431-44b8-a317-79e5d8babe25",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1040,
300
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#planner/tasks/$entity",
"@odata.etag": "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=\"",
"planId": "THwgIivuyU26ki8qS7ufcJgAB6zf",
"bucketId": "CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m",
"title": "do this",
"orderHint": "8584964728139267910",
"assigneePriority": "",
"percentComplete": 25,
"startDateTime": null,
"createdDateTime": "2024-01-13T08:21:11.5507897Z",
"dueDateTime": "2023-10-30T22:00:00Z",
"hasDescription": false,
"previewType": "automatic",
"completedDateTime": null,
"completedBy": null,
"referenceCount": 0,
"checklistItemCount": 0,
"activeChecklistItemCount": 0,
"conversationThreadId": null,
"priority": 5,
"id": "mYxTKaD9VkqWaBCJE5v4E5gAHcPB",
"createdBy": {
"user": {
"displayName": null,
"id": "b834447b-6848-4af9-8390-d2259ce46b74"
},
"application": {
"displayName": null,
"id": "66bdd989-4a29-465d-86fb-d94ed8fd86ed"
}
},
"appliedCategories": {},
"assignments": {
"ba4a422e-bdce-4795-b4b6-579287363f0e": {
"@odata.type": "#microsoft.graph.plannerAssignment",
"assignedDateTime": "2024-01-13T08:21:11.5507897Z",
"orderHint": "8584964728740986700PZ",
"assignedBy": {
"user": {
"displayName": null,
"id": "b834447b-6848-4af9-8390-d2259ce46b74"
},
"application": {
"displayName": null,
"id": "66bdd989-4a29-465d-86fb-d94ed8fd86ed"
}
}
}
}
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "8cb42e14-a12c-4c24-8374-4105664065c3",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"id": "73ZPNCHsvTvFBx1V",
"tags": []
}
@@ -0,0 +1,18 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, task => deleteTask', () => {
nock('https://graph.microsoft.com')
.get('/v1.0/planner/tasks/lDrRJ7N_-06p_26iKBtJ6ZgAKffD')
.reply(200, { '@odata.etag': 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc="' })
.delete('/v1.0/planner/tasks/lDrRJ7N_-06p_26iKBtJ6ZgAKffD')
.matchHeader('If-Match', 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc="')
.reply(200, {});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['deleteTask.workflow.json'],
});
});
@@ -0,0 +1,91 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "task",
"operation": "deleteTask",
"taskId": "lDrRJ7N_-06p_26iKBtJ6ZgAKffD"
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"success": true
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "ae5ed0d2-4513-457a-80a4-262126523553",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,65 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, task => get', () => {
nock('https://graph.microsoft.com')
.get('/v1.0/planner/tasks/lDrRJ7N_-06p_26iKBtJ6ZgAKffD')
.reply(200, {
'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#planner/tasks/$entity',
'@odata.etag': 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc="',
planId: 'THwgIivuyU26ki8qS7ufcJgAB6zf',
bucketId: 'CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m',
title: 'do this',
orderHint: '8585032308935758184',
assigneePriority: '',
percentComplete: 25,
startDateTime: null,
createdDateTime: '2023-10-27T03:06:31.9017623Z',
dueDateTime: '2023-10-30T22:00:00Z',
hasDescription: false,
previewType: 'automatic',
completedDateTime: null,
completedBy: null,
referenceCount: 0,
checklistItemCount: 0,
activeChecklistItemCount: 0,
conversationThreadId: null,
priority: 5,
id: 'lDrRJ7N_-06p_26iKBtJ6ZgAKffD',
createdBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
application: {
displayName: null,
id: '11111-2222-3333-44444',
},
},
appliedCategories: {},
assignments: {
'ba4a422e-bdce-4795-b4b6-579287363f0e': {
'@odata.type': '#microsoft.graph.plannerAssignment',
assignedDateTime: '2023-10-27T03:06:31.9017623Z',
orderHint: '8585032309536070726PE',
assignedBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
application: {
displayName: null,
id: '11111-2222-3333-44444',
},
},
},
},
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['get.workflow.json'],
});
});
@@ -0,0 +1,139 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "task",
"operation": "get",
"taskId": "lDrRJ7N_-06p_26iKBtJ6ZgAKffD"
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#planner/tasks/$entity",
"@odata.etag": "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc=\"",
"planId": "THwgIivuyU26ki8qS7ufcJgAB6zf",
"bucketId": "CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m",
"title": "do this",
"orderHint": "8585032308935758184",
"assigneePriority": "",
"percentComplete": 25,
"startDateTime": null,
"createdDateTime": "2023-10-27T03:06:31.9017623Z",
"dueDateTime": "2023-10-30T22:00:00Z",
"hasDescription": false,
"previewType": "automatic",
"completedDateTime": null,
"completedBy": null,
"referenceCount": 0,
"checklistItemCount": 0,
"activeChecklistItemCount": 0,
"conversationThreadId": null,
"priority": 5,
"id": "lDrRJ7N_-06p_26iKBtJ6ZgAKffD",
"createdBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
},
"application": {
"displayName": null,
"id": "11111-2222-3333-44444"
}
},
"appliedCategories": {},
"assignments": {
"ba4a422e-bdce-4795-b4b6-579287363f0e": {
"@odata.type": "#microsoft.graph.plannerAssignment",
"assignedDateTime": "2023-10-27T03:06:31.9017623Z",
"orderHint": "8585032309536070726PE",
"assignedBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
},
"application": {
"displayName": null,
"id": "11111-2222-3333-44444"
}
}
}
}
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "8147cd45-b1e6-44b3-abd2-232b44102660",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,154 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, task => getAll', () => {
nock('https://graph.microsoft.com')
.get('/v1.0/me')
.reply(200, { id: '123456789' })
.get('/v1.0/users/123456789/planner/tasks')
.reply(200, {
value: [
{
'@odata.etag': 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAZCc="',
planId: 'coJdCqzqNUKULQtTRWDa6pgACTln',
bucketId: null,
title: 'tada',
orderHint: '8585516884147534440',
assigneePriority: '8585516882706975451',
percentComplete: 10,
startDateTime: null,
createdDateTime: '2022-04-14T06:41:10.7241367Z',
dueDateTime: '2022-04-24T21:00:00Z',
hasDescription: false,
previewType: 'automatic',
completedDateTime: null,
completedBy: null,
referenceCount: 0,
checklistItemCount: 0,
activeChecklistItemCount: 0,
conversationThreadId: null,
priority: 5,
id: '1KgwUqOmbU2C9mZWiqxiv5gAPp8Q',
createdBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
},
appliedCategories: {},
assignments: {
'11111-2222-3333': {
'@odata.type': '#microsoft.graph.plannerAssignment',
assignedDateTime: '2022-04-14T06:43:34.7800356Z',
orderHint: '8585516882406130277PO',
assignedBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
},
},
},
},
{
'@odata.etag': 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc="',
planId: 'coJdCqzqNUKULQtTRWDa6pgACTln',
bucketId: '2avE1BwPmEKp7Lxh0E-EmZgALF72',
title: '1',
orderHint: '8585516897613076919P1',
assigneePriority: '8585516890164965803',
percentComplete: 0,
startDateTime: null,
createdDateTime: '2022-04-14T06:19:44.2011467Z',
dueDateTime: null,
hasDescription: false,
previewType: 'automatic',
completedDateTime: null,
completedBy: null,
referenceCount: 0,
checklistItemCount: 0,
activeChecklistItemCount: 0,
conversationThreadId: null,
priority: 5,
id: 'J3MLUgtmJ06YJgenyujiYpgANMF1',
createdBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
},
appliedCategories: {},
assignments: {
'11111-2222-3333': {
'@odata.type': '#microsoft.graph.plannerAssignment',
assignedDateTime: '2022-04-14T06:31:08.9810004Z',
orderHint: '8585516890765590890Pw',
assignedBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
},
},
},
},
{
'@odata.etag': 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAVCc="',
planId: 'THwgIivuyU26ki8qS7ufcJgAB6zf',
bucketId: 'CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m',
title: 'td 54',
orderHint: '8585034751365009589',
assigneePriority: '8585034751365009589',
percentComplete: 0,
startDateTime: null,
createdDateTime: '2023-10-24T07:15:48.9766218Z',
dueDateTime: null,
hasDescription: true,
previewType: 'automatic',
completedDateTime: null,
completedBy: null,
referenceCount: 0,
checklistItemCount: 0,
activeChecklistItemCount: 0,
conversationThreadId: null,
priority: 5,
id: 'silreUDQskqFYfrO4EObD5gAKt_G',
createdBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
application: {
displayName: null,
id: '11111-2222-3333-44444',
},
},
appliedCategories: {},
assignments: {
'11111-2222-3333': {
'@odata.type': '#microsoft.graph.plannerAssignment',
assignedDateTime: '2023-10-24T07:15:48.9766218Z',
orderHint: '8585034751965947109Pc',
assignedBy: {
user: {
displayName: null,
id: '11111-2222-3333',
},
application: {
displayName: null,
id: '11111-2222-3333-44444',
},
},
},
},
},
],
});
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['getAll.workflow.json'],
});
});
@@ -0,0 +1,232 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "task",
"operation": "getAll",
"groupId": {
"__rl": true,
"value": "1644e7fe-547e-4223-a24f-922395865343",
"mode": "list",
"cachedResultName": "5w1hb7"
},
"returnAll": true
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"@odata.etag": "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAZCc=\"",
"planId": "coJdCqzqNUKULQtTRWDa6pgACTln",
"bucketId": null,
"title": "tada",
"orderHint": "8585516884147534440",
"assigneePriority": "8585516882706975451",
"percentComplete": 10,
"startDateTime": null,
"createdDateTime": "2022-04-14T06:41:10.7241367Z",
"dueDateTime": "2022-04-24T21:00:00Z",
"hasDescription": false,
"previewType": "automatic",
"completedDateTime": null,
"completedBy": null,
"referenceCount": 0,
"checklistItemCount": 0,
"activeChecklistItemCount": 0,
"conversationThreadId": null,
"priority": 5,
"id": "1KgwUqOmbU2C9mZWiqxiv5gAPp8Q",
"createdBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
}
},
"appliedCategories": {},
"assignments": {
"11111-2222-3333": {
"@odata.type": "#microsoft.graph.plannerAssignment",
"assignedDateTime": "2022-04-14T06:43:34.7800356Z",
"orderHint": "8585516882406130277PO",
"assignedBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
}
}
}
}
}
},
{
"json": {
"@odata.etag": "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc=\"",
"planId": "coJdCqzqNUKULQtTRWDa6pgACTln",
"bucketId": "2avE1BwPmEKp7Lxh0E-EmZgALF72",
"title": "1",
"orderHint": "8585516897613076919P1",
"assigneePriority": "8585516890164965803",
"percentComplete": 0,
"startDateTime": null,
"createdDateTime": "2022-04-14T06:19:44.2011467Z",
"dueDateTime": null,
"hasDescription": false,
"previewType": "automatic",
"completedDateTime": null,
"completedBy": null,
"referenceCount": 0,
"checklistItemCount": 0,
"activeChecklistItemCount": 0,
"conversationThreadId": null,
"priority": 5,
"id": "J3MLUgtmJ06YJgenyujiYpgANMF1",
"createdBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
}
},
"appliedCategories": {},
"assignments": {
"11111-2222-3333": {
"@odata.type": "#microsoft.graph.plannerAssignment",
"assignedDateTime": "2022-04-14T06:31:08.9810004Z",
"orderHint": "8585516890765590890Pw",
"assignedBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
}
}
}
}
}
},
{
"json": {
"@odata.etag": "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAVCc=\"",
"planId": "THwgIivuyU26ki8qS7ufcJgAB6zf",
"bucketId": "CO-ZsX1s4kO7FtO6ZHZdDpgAFL1m",
"title": "td 54",
"orderHint": "8585034751365009589",
"assigneePriority": "8585034751365009589",
"percentComplete": 0,
"startDateTime": null,
"createdDateTime": "2023-10-24T07:15:48.9766218Z",
"dueDateTime": null,
"hasDescription": true,
"previewType": "automatic",
"completedDateTime": null,
"completedBy": null,
"referenceCount": 0,
"checklistItemCount": 0,
"activeChecklistItemCount": 0,
"conversationThreadId": null,
"priority": 5,
"id": "silreUDQskqFYfrO4EObD5gAKt_G",
"createdBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
},
"application": {
"displayName": null,
"id": "11111-2222-3333-44444"
}
},
"appliedCategories": {},
"assignments": {
"11111-2222-3333": {
"@odata.type": "#microsoft.graph.plannerAssignment",
"assignedDateTime": "2023-10-24T07:15:48.9766218Z",
"orderHint": "8585034751965947109Pc",
"assignedBy": {
"user": {
"displayName": null,
"id": "11111-2222-3333"
},
"application": {
"displayName": null,
"id": "11111-2222-3333-44444"
}
}
}
}
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "34bcdc66-9dad-4c93-8456-4019f94c2f88",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}
@@ -0,0 +1,22 @@
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
import { credentials } from '../../../credentials';
describe('Test MicrosoftTeamsV2, task => update', () => {
nock('https://graph.microsoft.com')
.get('/v1.0/planner/tasks/lDrRJ7N_-06p_26iKBtJ6ZgAKffD')
.reply(200, { '@odata.etag': 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc="' })
.patch('/v1.0/planner/tasks/lDrRJ7N_-06p_26iKBtJ6ZgAKffD', {
dueDateTime: '2023-10-24T21:00:00.000Z',
percentComplete: 78,
title: 'do that',
})
.matchHeader('If-Match', 'W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBARCc="')
.reply(200);
new NodeTestHarness().setupTests({
credentials,
workflowFiles: ['update.workflow.json'],
});
});
@@ -0,0 +1,96 @@
{
"name": "My workflow 35",
"nodes": [
{
"parameters": {},
"id": "6666-9999-77777",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
880,
380
]
},
{
"parameters": {
"resource": "task",
"operation": "update",
"taskId": "lDrRJ7N_-06p_26iKBtJ6ZgAKffD",
"updateFields": {
"dueDateTime": "2023-10-24T21:00:00.000Z",
"percentComplete": 78,
"title": "do that"
}
},
"id": "6666-5555-77777",
"name": "Microsoft Teams",
"type": "n8n-nodes-base.microsoftTeams",
"typeVersion": 2,
"position": [
1100,
380
],
"credentials": {
"microsoftTeamsOAuth2Api": {
"id": "6isd5ytvA0qV78eK",
"name": "Microsoft Teams account"
}
}
},
{
"parameters": {},
"id": "9d1a2e59-c71c-486c-b3ac-dec6adbc26b3",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1400,
380
]
}
],
"pinData": {
"No Operation, do nothing": [
{
"json": {
"success": true
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Microsoft Teams",
"type": "main",
"index": 0
}
]
]
},
"Microsoft Teams": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "74d2873c-c1e1-4628-b398-e2a72c6eed9c",
"id": "i3NYGF0LXV4qDFV9",
"meta": {
"instanceId": "b888bd11cd1ddbb95450babf3e199556799d999b896f650de768b8370ee50363"
},
"tags": []
}