n8n-nodes-microsoft-teams-bot 1.4.0 → 2.2.0
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 +166 -0
- package/dist/credentials/TeamsBotApi.credentials.d.ts +1 -2
- package/dist/credentials/TeamsBotApi.credentials.js +0 -9
- package/dist/credentials/TeamsBotApi.credentials.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/nodes/TeamsBot/TeamsBot.node.js +46 -100
- package/dist/nodes/TeamsBot/TeamsBot.node.js.map +1 -1
- package/dist/nodes/TeamsBot/TeamsBot.node.json +72 -72
- package/dist/nodes/TeamsBot/TeamsBotAiTools.node.d.ts +12 -0
- package/dist/nodes/TeamsBot/TeamsBotAiTools.node.js +238 -0
- package/dist/nodes/TeamsBot/TeamsBotAiTools.node.js.map +1 -0
- package/dist/nodes/TeamsBot/TeamsBotTrigger.node.d.ts +2 -0
- package/dist/nodes/TeamsBot/TeamsBotTrigger.node.js +141 -20
- package/dist/nodes/TeamsBot/TeamsBotTrigger.node.js.map +1 -1
- package/dist/nodes/TeamsBot/TeamsBotTrigger.node.json +56 -56
- package/dist/nodes/TeamsBot/actions/buildCard.js +12 -6
- package/dist/nodes/TeamsBot/actions/buildCard.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/cards.d.ts +3 -2
- package/dist/nodes/TeamsBot/actions/cards.js +1 -0
- package/dist/nodes/TeamsBot/actions/cards.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/cards.process.js +31 -14
- package/dist/nodes/TeamsBot/actions/cards.process.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/cards.send.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/cards.update.d.ts +5 -0
- package/dist/nodes/TeamsBot/actions/cards.update.js +31 -1
- package/dist/nodes/TeamsBot/actions/cards.update.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/cards.validation.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/channels.js +17 -9
- package/dist/nodes/TeamsBot/actions/channels.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/chats.js +18 -5
- package/dist/nodes/TeamsBot/actions/chats.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/messages.d.ts +8 -0
- package/dist/nodes/TeamsBot/actions/messages.files.d.ts +2 -0
- package/dist/nodes/TeamsBot/actions/messages.files.js +77 -1
- package/dist/nodes/TeamsBot/actions/messages.files.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/messages.js +12 -0
- package/dist/nodes/TeamsBot/actions/messages.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/messages.list.js +21 -7
- package/dist/nodes/TeamsBot/actions/messages.list.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/messages.pins.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/messages.reactions.js +5 -4
- package/dist/nodes/TeamsBot/actions/messages.reactions.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/messages.send.js +165 -32
- package/dist/nodes/TeamsBot/actions/messages.send.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/messages.sendAndWait.js +48 -14
- package/dist/nodes/TeamsBot/actions/messages.sendAndWait.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/router.js +12 -2
- package/dist/nodes/TeamsBot/actions/router.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/subscriptions.d.ts +5 -0
- package/dist/nodes/TeamsBot/actions/subscriptions.js +28 -0
- package/dist/nodes/TeamsBot/actions/subscriptions.js.map +1 -0
- package/dist/nodes/TeamsBot/actions/teams.js +20 -12
- package/dist/nodes/TeamsBot/actions/teams.js.map +1 -1
- package/dist/nodes/TeamsBot/actions/users.js +11 -7
- package/dist/nodes/TeamsBot/actions/users.js.map +1 -1
- package/dist/nodes/TeamsBot/ai-tools/constants.d.ts +24 -0
- package/dist/nodes/TeamsBot/ai-tools/constants.js +74 -0
- package/dist/nodes/TeamsBot/ai-tools/constants.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/description-builders.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/description-builders.js +132 -0
- package/dist/nodes/TeamsBot/ai-tools/description-builders.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/error-formatter.d.ts +37 -0
- package/dist/nodes/TeamsBot/ai-tools/error-formatter.js +64 -0
- package/dist/nodes/TeamsBot/ai-tools/error-formatter.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/card.executor.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/card.executor.js +84 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/card.executor.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/channel.executor.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/channel.executor.js +65 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/channel.executor.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/chat.executor.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/chat.executor.js +81 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/chat.executor.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/index.d.ts +6 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/index.js +16 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/index.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/message.executor.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/message.executor.js +183 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/message.executor.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/team.executor.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/team.executor.js +81 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/team.executor.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/user.executor.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/user.executor.js +67 -0
- package/dist/nodes/TeamsBot/ai-tools/executors/user.executor.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/channel.resolver.d.ts +3 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/channel.resolver.js +53 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/channel.resolver.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/index.d.ts +28 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/index.js +72 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/index.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/team.resolver.d.ts +3 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/team.resolver.js +57 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/team.resolver.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/user.resolver.d.ts +3 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/user.resolver.js +91 -0
- package/dist/nodes/TeamsBot/ai-tools/resolvers/user.resolver.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/runtime.d.ts +14 -0
- package/dist/nodes/TeamsBot/ai-tools/runtime.js +71 -0
- package/dist/nodes/TeamsBot/ai-tools/runtime.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/schema-generator.d.ts +10 -0
- package/dist/nodes/TeamsBot/ai-tools/schema-generator.js +454 -0
- package/dist/nodes/TeamsBot/ai-tools/schema-generator.js.map +1 -0
- package/dist/nodes/TeamsBot/ai-tools/tool-executor.d.ts +2 -0
- package/dist/nodes/TeamsBot/ai-tools/tool-executor.js +86 -0
- package/dist/nodes/TeamsBot/ai-tools/tool-executor.js.map +1 -0
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.approval.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.custom.js +2 -2
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.custom.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.list.js +1 -1
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.list.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.notification.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.operations.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.welcome.js +3 -3
- package/dist/nodes/TeamsBot/descriptions/buildCard.description.welcome.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/card.description.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/card.description.operations.js +7 -3
- package/dist/nodes/TeamsBot/descriptions/card.description.operations.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/card.description.process.js +2 -6
- package/dist/nodes/TeamsBot/descriptions/card.description.process.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/card.description.send.js +35 -154
- package/dist/nodes/TeamsBot/descriptions/card.description.send.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/card.description.update.js +39 -32
- package/dist/nodes/TeamsBot/descriptions/card.description.update.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/chat.description.js +42 -9
- package/dist/nodes/TeamsBot/descriptions/chat.description.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/common.fields.d.ts +31 -0
- package/dist/nodes/TeamsBot/descriptions/common.fields.js +150 -0
- package/dist/nodes/TeamsBot/descriptions/common.fields.js.map +1 -0
- package/dist/nodes/TeamsBot/descriptions/message.mutate.description.js +49 -24
- package/dist/nodes/TeamsBot/descriptions/message.mutate.description.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/message.reactionsAndFiles.description.js +101 -0
- package/dist/nodes/TeamsBot/descriptions/message.reactionsAndFiles.description.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/message.send.description.js +17 -39
- package/dist/nodes/TeamsBot/descriptions/message.send.description.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/message.sendAndWait.description.js +6 -41
- package/dist/nodes/TeamsBot/descriptions/message.sendAndWait.description.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/message.shared.description.d.ts +1 -1
- package/dist/nodes/TeamsBot/descriptions/message.shared.description.js +32 -70
- package/dist/nodes/TeamsBot/descriptions/message.shared.description.js.map +1 -1
- package/dist/nodes/TeamsBot/descriptions/node.description.base.js +27 -0
- package/dist/nodes/TeamsBot/descriptions/node.description.base.js.map +1 -1
- package/dist/nodes/TeamsBot/methods/credentialTest.js +6 -6
- package/dist/nodes/TeamsBot/methods/credentialTest.js.map +1 -1
- package/dist/nodes/TeamsBot/methods/listSearch.d.ts +1 -1
- package/dist/nodes/TeamsBot/methods/listSearch.js +105 -10
- package/dist/nodes/TeamsBot/methods/listSearch.js.map +1 -1
- package/dist/nodes/TeamsBot/teams.svg +11 -11
- package/dist/nodes/TeamsBot/transport/BotActivityHandler.d.ts +27 -0
- package/dist/nodes/TeamsBot/transport/BotActivityHandler.js +39 -0
- package/dist/nodes/TeamsBot/transport/BotActivityHandler.js.map +1 -0
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.d.ts +39 -0
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.graph.d.ts +17 -0
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.graph.js +18 -0
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.graph.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.js +29 -0
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.messages.d.ts +8 -0
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.messages.js +9 -0
- package/dist/nodes/TeamsBot/transport/TeamsApiClient.messages.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.auth.js +7 -7
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.auth.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.cards.js +6 -6
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.cards.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.conversations.d.ts +9 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.conversations.js +29 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.conversations.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.d.ts +5 -0
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.helpers.d.ts +9 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.helpers.js +39 -2
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.helpers.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.js +6 -0
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.messages.d.ts +6 -0
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.messages.js +22 -5
- package/dist/nodes/TeamsBot/transport/api/AgentsApi.messages.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.auth.d.ts +3 -0
- package/dist/nodes/TeamsBot/transport/api/GraphApi.auth.js +41 -3
- package/dist/nodes/TeamsBot/transport/api/GraphApi.auth.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.d.ts +20 -0
- package/dist/nodes/TeamsBot/transport/api/GraphApi.js +20 -0
- package/dist/nodes/TeamsBot/transport/api/GraphApi.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.messages.js +2 -6
- package/dist/nodes/TeamsBot/transport/api/GraphApi.messages.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.pins.js +2 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.pins.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.teams.js +2 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.teams.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.users.js +2 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApi.users.js.map +1 -1
- package/dist/nodes/TeamsBot/transport/api/GraphApiClient.auth.js +8 -6
- package/dist/nodes/TeamsBot/transport/api/GraphApiClient.auth.js.map +1 -1
- package/dist/nodes/TeamsBot/types/ConversationReferenceStore.d.ts +20 -0
- package/dist/nodes/TeamsBot/types/ConversationReferenceStore.js +3 -0
- package/dist/nodes/TeamsBot/types/ConversationReferenceStore.js.map +1 -0
- package/dist/nodes/TeamsBot/types/api-types.d.ts +19 -0
- package/dist/nodes/TeamsBot/types/index.d.ts +1 -0
- package/dist/nodes/TeamsBot/types/index.js +2 -0
- package/dist/nodes/TeamsBot/types/index.js.map +1 -1
- package/dist/nodes/TeamsBot/utils/ActivityNormaliser.d.ts +33 -0
- package/dist/nodes/TeamsBot/utils/ActivityNormaliser.js +93 -0
- package/dist/nodes/TeamsBot/utils/ActivityNormaliser.js.map +1 -0
- package/dist/nodes/TeamsBot/utils/ConversationIdResolver.d.ts +21 -0
- package/dist/nodes/TeamsBot/utils/ConversationIdResolver.js +41 -0
- package/dist/nodes/TeamsBot/utils/ConversationIdResolver.js.map +1 -0
- package/dist/nodes/TeamsBot/utils/StaticDataConversationReferenceStore.d.ts +11 -0
- package/dist/nodes/TeamsBot/utils/StaticDataConversationReferenceStore.js +32 -0
- package/dist/nodes/TeamsBot/utils/StaticDataConversationReferenceStore.js.map +1 -0
- package/dist/nodes/TeamsBot/utils/{subscriptionManager.d.ts → SubscriptionManager.d.ts} +28 -1
- package/dist/nodes/TeamsBot/utils/{subscriptionManager.js → SubscriptionManager.js} +37 -2
- package/dist/nodes/TeamsBot/utils/SubscriptionManager.js.map +1 -0
- package/dist/nodes/TeamsBot/utils/constants.d.ts +21 -0
- package/dist/nodes/TeamsBot/utils/constants.js +26 -1
- package/dist/nodes/TeamsBot/utils/constants.js.map +1 -1
- package/dist/nodes/TeamsBot/utils/graphNotificationParser.d.ts +8 -0
- package/dist/nodes/TeamsBot/utils/graphNotificationParser.js +17 -0
- package/dist/nodes/TeamsBot/utils/graphNotificationParser.js.map +1 -1
- package/dist/nodes/TeamsBot/utils/invokeResponse.d.ts +5 -0
- package/dist/nodes/TeamsBot/utils/invokeResponse.js +14 -0
- package/dist/nodes/TeamsBot/utils/invokeResponse.js.map +1 -0
- package/dist/nodes/TeamsBot/utils/sendAndWaitWebhook.js +38 -20
- package/dist/nodes/TeamsBot/utils/sendAndWaitWebhook.js.map +1 -1
- package/dist/nodes/TeamsBot/utils/tokenHelpers.d.ts +5 -0
- package/dist/nodes/TeamsBot/utils/tokenHelpers.js +39 -3
- package/dist/nodes/TeamsBot/utils/tokenHelpers.js.map +1 -1
- package/package.json +18 -8
- package/dist/nodes/TeamsBot/utils/subscriptionManager.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# n8n-nodes-microsoft-teams-bot
|
|
2
|
+
|
|
3
|
+
This is an n8n community node package for Microsoft Teams Bot integration. It provides comprehensive bot-powered messaging, Adaptive Card support, and Graph API operations for Microsoft Teams.
|
|
4
|
+
|
|
5
|
+
The package exposes three nodes:
|
|
6
|
+
|
|
7
|
+
- **TeamsBot** -- an action node for sending messages, managing Adaptive Cards, querying channels, chats, teams, and users.
|
|
8
|
+
- **TeamsBotAiTools** -- an AI tools output node exposing Teams operations for the n8n AI Agent and MCP Trigger.
|
|
9
|
+
- **TeamsBotTrigger** -- a trigger node that receives Teams events via Microsoft Graph API change subscriptions.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Follow the [n8n community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/).
|
|
14
|
+
|
|
15
|
+
1. Open your n8n instance.
|
|
16
|
+
2. Go to **Settings > Community Nodes**.
|
|
17
|
+
3. Select **Install**.
|
|
18
|
+
4. Enter `n8n-nodes-microsoft-teams-bot` in the package name field.
|
|
19
|
+
5. Agree to the risks of using community nodes and select **Install**.
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
### TeamsBot (Action Node)
|
|
24
|
+
|
|
25
|
+
#### Messages
|
|
26
|
+
|
|
27
|
+
- Send a message to a channel or chat
|
|
28
|
+
- Send and wait for a response (with Graph API subscription monitoring)
|
|
29
|
+
- Send or reply with file attachments
|
|
30
|
+
- Reply to an existing message (1:1 chats and channel threads)
|
|
31
|
+
- Reply to a channel thread via Agents SDK thread-scoped conversation IDs
|
|
32
|
+
- @mention team members via searchable dropdown (auto-constructs mention entities)
|
|
33
|
+
- Update or delete a message
|
|
34
|
+
- Soft delete and restore messages
|
|
35
|
+
- List, get, and get all messages
|
|
36
|
+
- List replies and delta queries
|
|
37
|
+
- Pin and unpin messages (chat and channel)
|
|
38
|
+
- Set and unset reactions
|
|
39
|
+
- Analyse reactions and get reaction analytics
|
|
40
|
+
- Export all or retained chat messages
|
|
41
|
+
- Process files and generate thumbnails
|
|
42
|
+
- Monitor upload progress
|
|
43
|
+
|
|
44
|
+
#### Adaptive Cards
|
|
45
|
+
|
|
46
|
+
- Send an Adaptive Card
|
|
47
|
+
- Send approval cards
|
|
48
|
+
- Send notification cards
|
|
49
|
+
- Update a card (in chat or channel)
|
|
50
|
+
- Process card actions
|
|
51
|
+
|
|
52
|
+
#### Card Builder
|
|
53
|
+
|
|
54
|
+
- Build Adaptive Cards using a visual builder with templates
|
|
55
|
+
|
|
56
|
+
#### Chats
|
|
57
|
+
|
|
58
|
+
- Create, get, update, and delete chats
|
|
59
|
+
- Get chat for app
|
|
60
|
+
- Add, get, list, and remove members
|
|
61
|
+
- Remove all access for a user
|
|
62
|
+
|
|
63
|
+
#### Channels
|
|
64
|
+
|
|
65
|
+
- Get channel by ID or name
|
|
66
|
+
- List all channels for a team
|
|
67
|
+
|
|
68
|
+
#### Teams
|
|
69
|
+
|
|
70
|
+
- Get team by ID or name
|
|
71
|
+
- List all teams
|
|
72
|
+
|
|
73
|
+
#### Users
|
|
74
|
+
|
|
75
|
+
- Get user by UPN (User Principal Name)
|
|
76
|
+
- List users
|
|
77
|
+
|
|
78
|
+
### TeamsBotAiTools (AI Tools Output Node)
|
|
79
|
+
|
|
80
|
+
Exposes Microsoft Teams Bot operations as AI tools for the n8n AI Agent node and MCP Trigger. Each resource produces a single unified tool with an `operation` enum field.
|
|
81
|
+
|
|
82
|
+
#### Resources
|
|
83
|
+
|
|
84
|
+
| Resource | Tool Name | Operations |
|
|
85
|
+
|----------|-----------|-----------|
|
|
86
|
+
| Message | `teamsbot_message` | send, reply, get, getAll, update, delete |
|
|
87
|
+
| Channel | `teamsbot_channel` | get, getAll |
|
|
88
|
+
| Team | `teamsbot_team` | get, getAll |
|
|
89
|
+
| User | `teamsbot_user` | get, getAll |
|
|
90
|
+
| Chat | `teamsbot_chat` | get, create, update, delete |
|
|
91
|
+
| Adaptive Card | `teamsbot_card` | send, update |
|
|
92
|
+
|
|
93
|
+
#### Features
|
|
94
|
+
|
|
95
|
+
- **Name→GUID resolution**: team names, channel names, and user display names/emails are automatically resolved to Microsoft Graph GUIDs. Ambiguous matches return candidates for user disambiguation.
|
|
96
|
+
- **Two-tier write safety**: operations classified as mutating (send, reply, create, update) or destructive (delete) with independent UI toggles. Read-only by default.
|
|
97
|
+
- **Structured response envelopes**: consistent JSON responses with `schemaVersion`, success/error indicators, and `nextAction` guidance for LLM self-correction.
|
|
98
|
+
|
|
99
|
+
### TeamsBotTrigger (Trigger Node)
|
|
100
|
+
|
|
101
|
+
Triggers a workflow when messages are posted in Microsoft Teams. Supports the following subscription scopes:
|
|
102
|
+
|
|
103
|
+
- **Specific Channel** -- trigger on messages in a particular Teams channel
|
|
104
|
+
- **Specific Chat** -- trigger on messages in a particular chat
|
|
105
|
+
- **All Chats** -- trigger on all chat messages across the tenant (requires additional licensing)
|
|
106
|
+
- **All Channels** -- trigger on all channel messages across the tenant (requires additional licensing)
|
|
107
|
+
|
|
108
|
+
The trigger node manages Graph API subscription lifecycle automatically, including creation on workflow activation and removal on deactivation.
|
|
109
|
+
|
|
110
|
+
## Credentials
|
|
111
|
+
|
|
112
|
+
This node uses a single credential type (`Teams Bot API`) that requires authentication details for two distinct Microsoft APIs.
|
|
113
|
+
|
|
114
|
+
### Microsoft 365 Agents SDK (required for messaging operations)
|
|
115
|
+
|
|
116
|
+
All message sending, updating, deleting, and Adaptive Card operations use the Microsoft 365 Agents SDK (formerly Bot Framework). You will need:
|
|
117
|
+
|
|
118
|
+
| Field | Description |
|
|
119
|
+
|---|---|
|
|
120
|
+
| **Bot ID (Microsoft App ID)** | The Application (Client) ID from your Azure Bot / Agents SDK app registration. |
|
|
121
|
+
| **Bot Secret** | The client secret for the bot app registration. |
|
|
122
|
+
| **Service URL** | The regional Bot Framework service URL for your Teams tenant (e.g. Americas, EMEA, APAC, India). |
|
|
123
|
+
|
|
124
|
+
### Microsoft Graph API (required for queries and subscriptions)
|
|
125
|
+
|
|
126
|
+
Channel, chat, team, and user queries, bot installation, and webhook subscriptions use the Microsoft Graph API with OAuth client credentials. You will need:
|
|
127
|
+
|
|
128
|
+
| Field | Description |
|
|
129
|
+
|---|---|
|
|
130
|
+
| **Azure AD App (Client) ID** | The Application (Client) ID from your Azure AD app registration. |
|
|
131
|
+
| **Tenant ID** | The Directory (Tenant) ID from the Azure Portal. |
|
|
132
|
+
| **Client Secret** | The client secret for Graph API authentication. |
|
|
133
|
+
|
|
134
|
+
### Teams App Configuration
|
|
135
|
+
|
|
136
|
+
| Field | Description |
|
|
137
|
+
|---|---|
|
|
138
|
+
| **Teams App ID** | The ID from your Teams app manifest (different from the Bot ID). Required for bot installation operations. |
|
|
139
|
+
|
|
140
|
+
### Optional: Encryption Certificates
|
|
141
|
+
|
|
142
|
+
For encrypted Graph API webhook notifications using `includeResourceData: true`, you can optionally provide:
|
|
143
|
+
|
|
144
|
+
- **Certificate Thumbprint** -- SHA-1 thumbprint of your X.509 certificate.
|
|
145
|
+
- **Certificate (PEM Format)** -- Your X.509 certificate in PEM format.
|
|
146
|
+
|
|
147
|
+
**Note:** If you use a single Azure AD app registration for both the Agents SDK and Graph API (recommended for simpler setup), the Bot ID and Client ID can be the same value, as can the Bot Secret and Client Secret.
|
|
148
|
+
|
|
149
|
+
## Compatibility
|
|
150
|
+
|
|
151
|
+
- Minimum n8n version: 1.0.0
|
|
152
|
+
- Node.js: >= 18.0.0
|
|
153
|
+
- Tested with n8n 1.14.x
|
|
154
|
+
|
|
155
|
+
## Resources
|
|
156
|
+
|
|
157
|
+
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
158
|
+
- [Microsoft Graph API Documentation](https://learn.microsoft.com/en-us/graph/overview)
|
|
159
|
+
- [Microsoft 365 Agents SDK Documentation](https://learn.microsoft.com/en-us/microsoft-365/agents-sdk/)
|
|
160
|
+
- [Azure Bot Service Registration](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-registration)
|
|
161
|
+
- [Teams Change Notifications Overview](https://learn.microsoft.com/en-us/graph/teams-change-notification-in-microsoft-teams-overview)
|
|
162
|
+
- [Adaptive Cards Documentation](https://adaptivecards.io/)
|
|
163
|
+
|
|
164
|
+
## Licence
|
|
165
|
+
|
|
166
|
+
[MIT](https://opensource.org/licenses/MIT)
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class TeamsBotApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
|
-
authenticate: IAuthenticateGeneric;
|
|
7
6
|
test: ICredentialTestRequest;
|
|
8
7
|
properties: INodeProperties[];
|
|
9
8
|
}
|
|
@@ -6,15 +6,6 @@ class TeamsBotApi {
|
|
|
6
6
|
this.name = 'teamsBotApi';
|
|
7
7
|
this.displayName = 'Teams Bot API';
|
|
8
8
|
this.documentationUrl = 'https://learn.microsoft.com/en-us/microsoft-365/agents-sdk/azure-bot-authentication-for-javascript';
|
|
9
|
-
// Authentication configuration for the Agents SDK
|
|
10
|
-
this.authenticate = {
|
|
11
|
-
type: 'generic',
|
|
12
|
-
properties: {
|
|
13
|
-
headers: {
|
|
14
|
-
Authorization: '={{$credentials.botToken}}',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
9
|
// Basic test - validates that Tenant ID is properly formatted
|
|
19
10
|
// Note: This does NOT test actual authentication (OAuth token endpoints require form-urlencoded)
|
|
20
11
|
// Comprehensive testing with actual API validation exists in teamsBotApiTest but requires
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamsBotApi.credentials.js","sourceRoot":"","sources":["../../credentials/TeamsBotApi.credentials.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TeamsBotApi.credentials.js","sourceRoot":"","sources":["../../credentials/TeamsBotApi.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,oGAAoG,CAAC;QAExH,8DAA8D;QAC9D,iGAAiG;QACjG,0FAA0F;QAC1F,+EAA+E;QAC/E,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,mEAAmE;gBAC5E,GAAG,EAAE,mCAAmC;aACxC;SACD,CAAC;QAEF,eAAU,GAAsB;YAC/B,iEAAiE;YACjE;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACV,0SAA0S;aAC3S;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACV,wOAAwO;aACzO;YACD;gBACC,WAAW,EAAE,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ACX,WAAW,EAAE,2LAA2L;gBACxM,QAAQ,EAAE,IAAI;aACd;YACD,iDAAiD;YACjD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,gOAAgO;gBAC7O,QAAQ,EAAE,IAAI;aACd;YACD,4DAA4D;YAC5D;gBACC,WAAW,EAAE,wBAAwB;gBACrC,IAAI,EAAE,uBAAuB;gBAC7B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,6MAA6M;aAC1N;YACD;gBACC,WAAW,EAAE,0BAA0B;gBACvC,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,SAAS,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,sMAAsM;aACnN;SACD,CAAC;IAGH,CAAC;CAAA;AA1ID,kCA0IC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
// Export nodes
|
|
18
18
|
__exportStar(require("./nodes/TeamsBot/TeamsBot.node"), exports);
|
|
19
19
|
__exportStar(require("./nodes/TeamsBot/TeamsBotTrigger.node"), exports);
|
|
20
|
+
__exportStar(require("./nodes/TeamsBot/TeamsBotAiTools.node"), exports);
|
|
20
21
|
// Export credentials
|
|
21
22
|
__exportStar(require("./credentials/TeamsBotApi.credentials"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iEAA+C;AAC/C,wEAAsD;AAEtD,qBAAqB;AACrB,wEAAsD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iEAA+C;AAC/C,wEAAsD;AACtD,wEAAsD;AAEtD,qBAAqB;AACrB,wEAAsD"}
|
|
@@ -103,7 +103,6 @@ class TeamsBot {
|
|
|
103
103
|
source: query.source,
|
|
104
104
|
});
|
|
105
105
|
const decision = typeof query.decision === 'string' ? query.decision : undefined;
|
|
106
|
-
const source = typeof query.source === 'string' ? query.source : undefined;
|
|
107
106
|
// Extract execution ID from resume URL path: /webhook-waiting/{executionId}/...
|
|
108
107
|
const path = req.path || req.url || '';
|
|
109
108
|
const execMatch = path.match(/\/webhook-waiting\/([^/]+)/);
|
|
@@ -111,111 +110,48 @@ class TeamsBot {
|
|
|
111
110
|
// Look up context from workflow static data (global) keyed by execution ID
|
|
112
111
|
// This persists across execution and webhook contexts in activated workflows
|
|
113
112
|
const workflowStaticData = this.getWorkflowStaticData('global');
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
workflowStaticData.sendAndWaitLinkContexts = {};
|
|
113
|
+
if (!workflowStaticData.sendAndWaitExecutions) {
|
|
114
|
+
workflowStaticData.sendAndWaitExecutions = {};
|
|
117
115
|
}
|
|
118
|
-
if (!workflowStaticData.sendAndWaitContexts) {
|
|
119
|
-
workflowStaticData.sendAndWaitContexts = {};
|
|
120
|
-
}
|
|
121
|
-
let context;
|
|
122
116
|
const now = Date.now();
|
|
123
|
-
const nodeId = this.getNode().id;
|
|
124
|
-
const workflow = this.getWorkflow();
|
|
125
117
|
this.logger.info('[TeamsBot] Looking up send-and-wait context', {
|
|
126
|
-
nodeId,
|
|
127
|
-
workflowId: workflow.id,
|
|
128
|
-
workflowActive: workflow.active,
|
|
129
118
|
executionIdFromPath,
|
|
130
|
-
|
|
131
|
-
executionContextKeys: Object.keys(workflowStaticData.sendAndWaitContexts),
|
|
132
|
-
allStaticDataKeys: Object.keys(workflowStaticData),
|
|
133
|
-
sendAndWaitExecutionsKeys: workflowStaticData.sendAndWaitExecutions
|
|
134
|
-
? Object.keys(workflowStaticData.sendAndWaitExecutions)
|
|
135
|
-
: [],
|
|
119
|
+
sendAndWaitExecutionsKeys: Object.keys(workflowStaticData.sendAndWaitExecutions),
|
|
136
120
|
});
|
|
137
|
-
// Clean up expired
|
|
138
|
-
for (const [key, ctx] of Object.entries(workflowStaticData.
|
|
121
|
+
// Clean up expired entries
|
|
122
|
+
for (const [key, ctx] of Object.entries(workflowStaticData.sendAndWaitExecutions)) {
|
|
139
123
|
if (ctx.expiresAt < now) {
|
|
140
|
-
delete workflowStaticData.
|
|
124
|
+
delete workflowStaticData.sendAndWaitExecutions[key];
|
|
141
125
|
workflowStaticData.__dataUpdated = true;
|
|
142
126
|
}
|
|
143
127
|
}
|
|
144
|
-
|
|
145
|
-
if (executionIdFromPath && workflowStaticData.
|
|
146
|
-
const storedContext = workflowStaticData.
|
|
128
|
+
let context;
|
|
129
|
+
if (executionIdFromPath && workflowStaticData.sendAndWaitExecutions[executionIdFromPath]) {
|
|
130
|
+
const storedContext = workflowStaticData.sendAndWaitExecutions[executionIdFromPath];
|
|
147
131
|
if (storedContext.expiresAt >= now) {
|
|
148
132
|
context = storedContext;
|
|
149
133
|
this.logger.info('[TeamsBot] Found valid send-and-wait context by executionId', {
|
|
150
|
-
|
|
151
|
-
messageId: context.messageId,
|
|
152
|
-
resource: context.resource,
|
|
134
|
+
executionIdFromPath,
|
|
153
135
|
});
|
|
154
|
-
delete workflowStaticData.
|
|
136
|
+
delete workflowStaticData.sendAndWaitExecutions[executionIdFromPath];
|
|
155
137
|
workflowStaticData.__dataUpdated = true;
|
|
156
138
|
}
|
|
157
139
|
else {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
140
|
+
// Entry was already removed by the expiry sweep above; this branch is defensive only.
|
|
141
|
+
delete workflowStaticData.sendAndWaitExecutions[executionIdFromPath];
|
|
142
|
+
this.logger.warn('[TeamsBot] Send-and-wait context expired', {
|
|
143
|
+
executionIdFromPath,
|
|
161
144
|
expiresAt: new Date(storedContext.expiresAt).toISOString(),
|
|
162
|
-
now: new Date(now).toISOString(),
|
|
163
145
|
});
|
|
164
146
|
workflowStaticData.__dataUpdated = true;
|
|
165
147
|
}
|
|
166
148
|
}
|
|
167
|
-
// Fallback: try node-scoped link context (legacy)
|
|
168
|
-
if (!context && workflowStaticData.sendAndWaitLinkContexts[nodeId]) {
|
|
169
|
-
const storedContext = workflowStaticData.sendAndWaitLinkContexts[nodeId];
|
|
170
|
-
if (storedContext.expiresAt >= now) {
|
|
171
|
-
context = storedContext;
|
|
172
|
-
this.logger.info('[TeamsBot] Found valid send-and-wait context (legacy node lookup)', {
|
|
173
|
-
nodeId,
|
|
174
|
-
messageId: context.messageId,
|
|
175
|
-
resource: context.resource,
|
|
176
|
-
});
|
|
177
|
-
delete workflowStaticData.sendAndWaitLinkContexts[nodeId];
|
|
178
|
-
workflowStaticData.__dataUpdated = true;
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
delete workflowStaticData.sendAndWaitLinkContexts[nodeId];
|
|
182
|
-
this.logger.warn('[TeamsBot] Send-and-wait context expired (legacy node lookup)', {
|
|
183
|
-
nodeId,
|
|
184
|
-
expiresAt: new Date(storedContext.expiresAt).toISOString(),
|
|
185
|
-
now: new Date(now).toISOString(),
|
|
186
|
-
});
|
|
187
|
-
workflowStaticData.__dataUpdated = true;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// Final fallback: no context found
|
|
191
149
|
if (!context) {
|
|
192
|
-
this.logger.warn('[TeamsBot] No send-and-wait context found
|
|
193
|
-
nodeId,
|
|
150
|
+
this.logger.warn('[TeamsBot] No send-and-wait context found', {
|
|
194
151
|
executionIdFromPath,
|
|
195
|
-
|
|
196
|
-
availableNodeKeys: Object.keys(workflowStaticData.sendAndWaitLinkContexts),
|
|
197
|
-
allStaticDataKeys: Object.keys(workflowStaticData),
|
|
152
|
+
availableKeys: Object.keys(workflowStaticData.sendAndWaitExecutions),
|
|
198
153
|
});
|
|
199
154
|
}
|
|
200
|
-
const messageId = context === null || context === void 0 ? void 0 : context.messageId;
|
|
201
|
-
const resource = context === null || context === void 0 ? void 0 : context.resource;
|
|
202
|
-
const recipientType = context === null || context === void 0 ? void 0 : context.recipientType;
|
|
203
|
-
const sendResponse = context === null || context === void 0 ? void 0 : context.sendResponse;
|
|
204
|
-
// Extract chatId/teamId/channelId from resource if present
|
|
205
|
-
let chatId;
|
|
206
|
-
let teamId;
|
|
207
|
-
let channelId;
|
|
208
|
-
if (resource) {
|
|
209
|
-
const chatMatch = resource.match(/\/chats\/([^\/]+)/);
|
|
210
|
-
if (chatMatch) {
|
|
211
|
-
chatId = chatMatch[1];
|
|
212
|
-
}
|
|
213
|
-
const channelMatch = resource.match(/\/teams\/([^\/]+)\/channels\/([^\/]+)/);
|
|
214
|
-
if (channelMatch) {
|
|
215
|
-
teamId = channelMatch[1];
|
|
216
|
-
channelId = channelMatch[2];
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
155
|
const decisionLabel = decision === 'approved'
|
|
220
156
|
? 'Approved'
|
|
221
157
|
: decision === 'declined'
|
|
@@ -242,27 +178,37 @@ class TeamsBot {
|
|
|
242
178
|
</body>
|
|
243
179
|
</html>
|
|
244
180
|
`;
|
|
181
|
+
const sendResponse = context === null || context === void 0 ? void 0 : context.sendResponse;
|
|
182
|
+
const contextResource = context === null || context === void 0 ? void 0 : context.resource;
|
|
183
|
+
let chatId = null;
|
|
184
|
+
let teamId = null;
|
|
185
|
+
let channelId = null;
|
|
186
|
+
if (contextResource) {
|
|
187
|
+
const chatMatch = contextResource.match(/\/chats\/([^\/]+)/);
|
|
188
|
+
if (chatMatch)
|
|
189
|
+
chatId = chatMatch[1];
|
|
190
|
+
const channelMatch = contextResource.match(/\/teams\/([^\/]+)\/channels\/([^\/]+)/);
|
|
191
|
+
if (channelMatch) {
|
|
192
|
+
teamId = channelMatch[1];
|
|
193
|
+
channelId = channelMatch[2];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
const approved = decision === 'approved';
|
|
197
|
+
const decisionField = decision === 'approved' ? 'approved'
|
|
198
|
+
: decision === 'declined' ? 'declined'
|
|
199
|
+
: 'unknown';
|
|
245
200
|
const responsePayload = {
|
|
246
|
-
|
|
247
|
-
decision,
|
|
248
|
-
|
|
249
|
-
|
|
201
|
+
data: { approved },
|
|
202
|
+
decision: decisionField,
|
|
203
|
+
respondedAt: new Date().toISOString(),
|
|
204
|
+
from: null,
|
|
205
|
+
reply: null,
|
|
206
|
+
messageId: null,
|
|
207
|
+
sendResponse: sendResponse !== null && sendResponse !== void 0 ? sendResponse : null,
|
|
208
|
+
chatId,
|
|
209
|
+
teamId,
|
|
210
|
+
channelId,
|
|
250
211
|
};
|
|
251
|
-
// Include context from URL query params (already extracted above)
|
|
252
|
-
if (messageId)
|
|
253
|
-
responsePayload.messageId = messageId;
|
|
254
|
-
if (resource)
|
|
255
|
-
responsePayload.resource = resource;
|
|
256
|
-
if (recipientType)
|
|
257
|
-
responsePayload.recipientType = recipientType;
|
|
258
|
-
if (chatId)
|
|
259
|
-
responsePayload.chatId = chatId;
|
|
260
|
-
if (teamId)
|
|
261
|
-
responsePayload.teamId = teamId;
|
|
262
|
-
if (channelId)
|
|
263
|
-
responsePayload.channelId = channelId;
|
|
264
|
-
if (sendResponse)
|
|
265
|
-
responsePayload.sendResponse = sendResponse;
|
|
266
212
|
return {
|
|
267
213
|
webhookResponse: htmlPage,
|
|
268
214
|
workflowData: [[{ json: responsePayload }]],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamsBot.node.js","sourceRoot":"","sources":["../../../nodes/TeamsBot/TeamsBot.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,6CAA0C;AAC1C,iEAAmD;AACnD,6DAA+D;AAC/D,sEAAqF;AACrF,6CAA6E;AAC7E,6EAA0E;AAC1E,mEAAsE;AAEtE,MAAa,QAAQ;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C,IAAI,CAAC;gBACnB,KAAK,EAAE,uBAAuB;gBAC9B,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;YAEH,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;SACpC;IACH,CAAC;CACF;AAnRD,4BAmRC"}
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"node": "n8n-nodes-microsoft-teams-bot",
|
|
3
|
-
"nodeVersion": 1,
|
|
4
|
-
"codexVersion": 1,
|
|
5
|
-
"categories": [
|
|
6
|
-
"Communication"
|
|
7
|
-
],
|
|
8
|
-
"resources": {
|
|
9
|
-
"credentialDocumentation": [
|
|
10
|
-
{
|
|
11
|
-
"url": "https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-registration"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"primaryDocumentation": [
|
|
15
|
-
{
|
|
16
|
-
"url": "https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
"subcategories": {
|
|
21
|
-
"Core Nodes": [
|
|
22
|
-
"Communication"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"alias": [
|
|
26
|
-
"Microsoft",
|
|
27
|
-
"Teams",
|
|
28
|
-
"Bot",
|
|
29
|
-
"Chat",
|
|
30
|
-
"Message",
|
|
31
|
-
"Channel",
|
|
32
|
-
"Card",
|
|
33
|
-
"Adaptive Card"
|
|
34
|
-
],
|
|
35
|
-
"operations": {
|
|
36
|
-
"channel": {
|
|
37
|
-
"send": {
|
|
38
|
-
"description": "Send a message to a channel (Agents SDK)",
|
|
39
|
-
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-send-and-receive-messages"
|
|
40
|
-
},
|
|
41
|
-
"sendCard": {
|
|
42
|
-
"description": "Send an adaptive card to a channel (Agents SDK)",
|
|
43
|
-
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-add-rich-cards"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"user": {
|
|
47
|
-
"send": {
|
|
48
|
-
"description": "Send a message to a user (Agents SDK)",
|
|
49
|
-
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-send-and-receive-messages"
|
|
50
|
-
},
|
|
51
|
-
"sendCard": {
|
|
52
|
-
"description": "Send an adaptive card to a user (Agents SDK)",
|
|
53
|
-
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-add-rich-cards"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"card": {
|
|
57
|
-
"update": {
|
|
58
|
-
"description": "Update an existing adaptive card (Agents SDK)",
|
|
59
|
-
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-add-rich-cards"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"app": {
|
|
63
|
-
"install": {
|
|
64
|
-
"description": "Install the bot in a team or for a user (Graph API)",
|
|
65
|
-
"documentationUrl": "https://learn.microsoft.com/en-us/graph/api/teamsappinstallation-add"
|
|
66
|
-
},
|
|
67
|
-
"check": {
|
|
68
|
-
"description": "Check if the bot is installed (Graph API)",
|
|
69
|
-
"documentationUrl": "https://learn.microsoft.com/en-us/graph/api/teamsappinstallation-list"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-microsoft-teams-bot",
|
|
3
|
+
"nodeVersion": 1,
|
|
4
|
+
"codexVersion": 1,
|
|
5
|
+
"categories": [
|
|
6
|
+
"Communication"
|
|
7
|
+
],
|
|
8
|
+
"resources": {
|
|
9
|
+
"credentialDocumentation": [
|
|
10
|
+
{
|
|
11
|
+
"url": "https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-registration"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"primaryDocumentation": [
|
|
15
|
+
{
|
|
16
|
+
"url": "https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"subcategories": {
|
|
21
|
+
"Core Nodes": [
|
|
22
|
+
"Communication"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"alias": [
|
|
26
|
+
"Microsoft",
|
|
27
|
+
"Teams",
|
|
28
|
+
"Bot",
|
|
29
|
+
"Chat",
|
|
30
|
+
"Message",
|
|
31
|
+
"Channel",
|
|
32
|
+
"Card",
|
|
33
|
+
"Adaptive Card"
|
|
34
|
+
],
|
|
35
|
+
"operations": {
|
|
36
|
+
"channel": {
|
|
37
|
+
"send": {
|
|
38
|
+
"description": "Send a message to a channel (Agents SDK)",
|
|
39
|
+
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-send-and-receive-messages"
|
|
40
|
+
},
|
|
41
|
+
"sendCard": {
|
|
42
|
+
"description": "Send an adaptive card to a channel (Agents SDK)",
|
|
43
|
+
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-add-rich-cards"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"user": {
|
|
47
|
+
"send": {
|
|
48
|
+
"description": "Send a message to a user (Agents SDK)",
|
|
49
|
+
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-send-and-receive-messages"
|
|
50
|
+
},
|
|
51
|
+
"sendCard": {
|
|
52
|
+
"description": "Send an adaptive card to a user (Agents SDK)",
|
|
53
|
+
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-add-rich-cards"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"card": {
|
|
57
|
+
"update": {
|
|
58
|
+
"description": "Update an existing adaptive card (Agents SDK)",
|
|
59
|
+
"documentationUrl": "https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-add-rich-cards"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"app": {
|
|
63
|
+
"install": {
|
|
64
|
+
"description": "Install the bot in a team or for a user (Graph API)",
|
|
65
|
+
"documentationUrl": "https://learn.microsoft.com/en-us/graph/api/teamsappinstallation-add"
|
|
66
|
+
},
|
|
67
|
+
"check": {
|
|
68
|
+
"description": "Check if the bot is installed (Graph API)",
|
|
69
|
+
"documentationUrl": "https://learn.microsoft.com/en-us/graph/api/teamsappinstallation-list"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
73
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IExecuteFunctions, ILoadOptionsFunctions, INodeType, INodeTypeDescription, INodePropertyOptions, INodeExecutionData, ISupplyDataFunctions, SupplyData } from 'n8n-workflow';
|
|
2
|
+
export declare class TeamsBotAiTools implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getToolResources(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
getToolResourceOperations(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
|
11
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
12
|
+
}
|