@frogbotai/piece-microsoft-teams 0.22.0 → 0.23.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 ADDED
@@ -0,0 +1,80 @@
1
+ # `@frogbotai/piece-microsoft-teams`
2
+
3
+ Native Microsoft Graph actions, polling triggers, and Azure Bot channel support for Teams.
4
+
5
+ ## Usage
6
+
7
+ ```ts
8
+ import { defineMicrosoftTeams } from '@frogbotai/piece-microsoft-teams';
9
+
10
+ const createMicrosoftTeams = defineMicrosoftTeams({
11
+ cloud: 'usGovernment',
12
+ tenantId: process.env.MICROSOFT_TENANT_ID!,
13
+ });
14
+
15
+ export const microsoftTeams = createMicrosoftTeams({
16
+ auth: {
17
+ appId: process.env.TEAMS_BOT_APP_ID!,
18
+ appPassword: process.env.TEAMS_BOT_APP_PASSWORD!,
19
+ },
20
+ oauth: {
21
+ clientId: process.env.MICROSOFT_GRAPH_CLIENT_ID!,
22
+ clientSecret: process.env.MICROSOFT_GRAPH_CLIENT_SECRET!,
23
+ },
24
+ });
25
+ ```
26
+
27
+ `defineMicrosoftTeams()` defaults to the commercial Microsoft cloud and the `common` tenant. Select the cloud and tenant when defining the factory so the OAuth authorization URL, token URL, stored credential, account lookup, and all Graph requests use one environment. `createMicrosoftTeams` is the pre-defined commercial `common` factory.
28
+
29
+ Azure Bot credentials and user Graph OAuth are independent. The factory `auth` config runs the channel adapter. A user's OAuth connection supplies the delegated Graph access token for actions; bot credentials never authorize Graph actions.
30
+
31
+ ## Teams channel setup
32
+
33
+ 1. Create an Azure Bot and its Microsoft Entra application. Record the application ID and client secret as `appId` and `appPassword`.
34
+ 2. Enable the Microsoft Teams channel on the Azure Bot.
35
+ 3. Set the bot messaging endpoint to `/api/webhooks/<piece-instance-slug>` on the public FrogBot URL. The instance is bound to one agent at boot and must have a globally unique slug.
36
+ 4. Create or upload a Teams app manifest whose bot ID is the same Azure Bot application ID. Add personal, team, and group chat scopes as needed, then install the app.
37
+ 5. Use `botAppType: 'SingleTenant'` with `botTenantId` for a single-tenant registration. Multi-tenant is the default.
38
+
39
+ Bot Framework Activities are authenticated by the official Teams adapter. FrogBot does not parse or accept an Activity before that adapter validates its bearer JWT. Live incoming authors may include an email resolved through the conversation-members API; FrogBot matches that normalized email to a local user. A missing email produces an anonymous channel participant and leaves access to the agent's channel access rule.
40
+
41
+ The separate Graph OAuth app registration uses the scopes below for user actions. It may be the same Entra application only when its bot credential, redirect URI, delegated permissions, and operational ownership are intentionally managed together; the two credentials remain separate in FrogBot configuration.
42
+
43
+ ## Actions
44
+
45
+ | Upstream action slug | Previous wrapper export | Native action | Notes |
46
+ | ---------------------------------------------- | ---------------------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
47
+ | `microsoft_teams_create_channel` | `microsoftTeamsCreateChannel` | `createChannel` | Standard channel |
48
+ | `microsoft_teams_send_channel_message` | `microsoftTeamsSendChannelMessage` | `sendChannelMessage` | Text or HTML |
49
+ | `microsoft_teams_send_chat_message` | `microsoftTeamsSendChatMessage` | `sendChatMessage` | Text or HTML |
50
+ | `microsoft_teams_reply_to_channel_message` | `microsoftTeamsReplyToChannelMessage` | `replyToChannelMessage` | Thread reply |
51
+ | `microsoft_teams_create_chat_and_send_message` | `microsoftTeamsCreateChatAndSendMessage` | `createChatAndSendMessage` | One-to-one or group chat |
52
+ | `microsoft_teams_create_private_channel` | `microsoftTeamsCreatePrivateChannel` | `createPrivateChannel` | Private channel |
53
+ | `microsoft_teams_get_chat_message` | `microsoftTeamsGetChatMessage` | `getChatMessage` | |
54
+ | `microsoft_teams_delete_chat_message` | `microsoftTeamsDeleteChatMessage` | `deleteChatMessage` | Soft delete |
55
+ | `microsoft_teams_get_channel_message` | `microsoftTeamsGetChannelMessage` | `getChannelMessage` | Supports replies |
56
+ | `microsoft_teams_find_channel` | `microsoftTeamsFindChannel` | `findChannel` | Exact display-name match |
57
+ | `microsoft_teams_find_team_member` | `microsoftTeamsFindTeamMember` | `findTeamMember` | Exact email or display-name match |
58
+ | `microsoft_teams_get_meeting_transcript` | `microsoftTeamsGetMeetingTranscript` | `getMeetingTranscript` | Lists metadata or returns VTT text; no file is created because the upstream output is text |
59
+ | `microsoft_teams_get_meeting_recording` | `microsoftTeamsGetMeetingRecording` | `getMeetingRecording` | Lists or returns metadata; upstream does not download recording bytes |
60
+ | `request_approval_in_channel` | `requestApprovalInChannel` | Omitted | Activepieces-specific waitpoint action calls `run.pause` and resumes from an approval URL; durable waits belong to the FrogBot workflow host |
61
+ | `request_approval_direct_message` | `requestApprovalDirectMessage` | Omitted | Activepieces-specific waitpoint action calls `run.pause` and resumes from an approval URL; durable waits belong to the FrogBot workflow host |
62
+ | `custom_api_call` | `customApiCall` | `customApiCall` | Authenticated JSON requests restricted to the configured Microsoft Graph v1.0 origin; redirects and cross-origin URLs are rejected |
63
+
64
+ ## Triggers
65
+
66
+ | Upstream trigger slug | Native trigger | Type | Notes |
67
+ | ---------------------- | ------------------------- | --------- | ----------------------------------------------- |
68
+ | `new-channel-message` | `channelMessageCreated` | `polling` | Uses the Graph delta link as its cursor |
69
+ | `new-channel` | `channelCreated` | `polling` | Uses creation time as its cursor |
70
+ | `new-chat` | `chatCreated` | `polling` | Uses creation time as its cursor |
71
+ | `new-chat-message` | `chatMessageCreated` | `polling` | Uses the Graph delta link as its cursor |
72
+ | Bot Framework message | `messageReceived` | `app` | Secure shared bot ingress |
73
+ | Bot Framework reaction | `messageReactionReceived` | `app` | Added and removed reactions |
74
+ | Adaptive Card action | `cardActionReceived` | `app` | `Action.Submit` and adaptive-card invokes |
75
+ | Conversation update | `conversationUpdated` | `app` | Membership and bot-install conversation updates |
76
+ | Installation update | `installationUpdated` | `app` | Teams app installation changes |
77
+ | Dialog open | `dialogOpened` | `app` | Task module open invokes |
78
+ | Dialog submit | `dialogSubmitted` | `app` | Task module submissions |
79
+
80
+ Polling runs every five minutes. Microsoft Graph does not offer delegated webhooks for this preserved piece contract, so events can arrive after the corresponding Teams activity; delta cursors prevent replay after a successful poll.