Microsoft Teams
Send messages, create channels, and collaborate in Microsoft Teams.
On this page
- Connect
- Call it from a workflow
- Actions (14)
- microsoft_teams_create_channel
- microsoft_teams_create_chat_and_send_message
- custom_api_call
- microsoft_teams_create_private_channel
- microsoft_teams_delete_chat_message
- microsoft_teams_find_channel
- microsoft_teams_find_team_member
- microsoft_teams_get_channel_message
- microsoft_teams_get_chat_message
- microsoft_teams_reply_to_channel_message
- microsoft_teams_send_channel_message
- microsoft_teams_send_chat_message
- request_approval_direct_message
- request_approval_in_channel
- Details
Connect
Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.
Scopes requested: Chat.ReadWriteChannelMessage.SendUser.Read
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("microsoft_teams", action, input) resolves with the provider's answer and rejects when Microsoft Teams isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "microsoft_teams"} says whether yours can call it.
// workflows/notify.ts: call Microsoft Teams when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellMicrosoftTeams = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Microsoft Teams isn't connected.
const output = await step.run("Microsoft Teams", () =>
step.ctx.integrations.invoke("microsoft_teams", "microsoft_teams_create_channel", {
"teamId": "<teamId>",
"channelDisplayName": "<channel name>"
}),
);
step.ctx.log("Microsoft Teams answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "microsoft_teams",
"piece_action": "microsoft_teams_create_channel",
"input": {
"teamId": "<teamId>",
"channelDisplayName": "<channel name>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/microsoft_teams/microsoft_teams_create_channel" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"teamId":"<teamId>","channelDisplayName":"<channel name>"}}'Actions
microsoft_teams_create_channel
Create Channel. Create a new channel in Microsoft Teams.
Also accepted as create_channel.
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
channelDisplayNamerequired | text | Channel Name |
channelDescriptionoptional | long text | Channel Description |
microsoft_teams_create_chat_and_send_message
Create Chat & Send Message. Start a new chat and send an initial message.
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
membersrequired | ids (picked from your account) | Member |
contentTyperequired | one of "text" | "html" | Message Content Type |
contentrequired | long text | Initial Message |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
microsoft_teams_create_private_channel
Create Private Channel. Create a new private channel in a team.
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
channelDisplayNamerequired | text | Channel Name |
channelDescriptionoptional | long text | Channel Description |
microsoft_teams_delete_chat_message
Delete Chat Message. Soft-Deletes a message in chat.You can only delete messages you sent.
| Input | Type | Description |
|---|---|---|
chatIdrequired | id (picked from your account) | Chat ID |
messageIdrequired | text | The ID of the message to delete. |
microsoft_teams_find_channel
Find Channel. Finds channels by name.
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
channelNamerequired | text | Channel Name |
microsoft_teams_find_team_member
Find Team Member. Finds a team member by email or display name.
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
searchByrequired | one of "email" | "name" | Search By |
searchValuerequired | text | Email address or name to search for. |
microsoft_teams_get_channel_message
Get Channel Message. Fetch a specific channel message by team, channel, and message ID (optionally a reply).
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
channelIdrequired | id (picked from your account) | Channel ID |
messageIdrequired | text | The ID of the channel message to retrieve. |
replyIdoptional | text | Provide to fetch a specific reply under the message. |
microsoft_teams_get_chat_message
Get Chat Message. Fetch a specific chat message by chat and message ID.
| Input | Type | Description |
|---|---|---|
chatIdrequired | id (picked from your account) | Chat ID |
messageIdrequired | text | The ID of the message to retrieve. |
microsoft_teams_reply_to_channel_message
Reply to Channel Message. Post a reply to an existing channel message.
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
channelIdrequired | id (picked from your account) | Channel ID |
messageIdrequired | text | ID of the parent message to reply to. |
contentTyperequired | one of "text" | "html" | Content Type |
contentrequired | long text | Message |
microsoft_teams_send_channel_message
Send Channel Message. Sends a message to a teams's channel.
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
channelIdrequired | id (picked from your account) | Channel ID |
contentTyperequired | one of "text" | "html" | Content Type |
contentrequired | long text | Use @username to mention team members in the message. |
microsoft_teams_send_chat_message
Send Chat Message. Sends a message in an existing chat.
| Input | Type | Description |
|---|---|---|
chatIdrequired | id (picked from your account) | Chat ID |
contentTyperequired | one of "text" | "html" | Content Type |
contentrequired | long text | Message |
request_approval_direct_message
Request Approval from a User. Send approval message to a user and then wait until the message is approved or disapproved
| Input | Type | Description |
|---|---|---|
chatIdrequired | id (picked from your account) | Chat ID |
messagerequired | long text | Message |
request_approval_in_channel
Request Approval in Channel. Send approval message to a channel and then wait until the message is approved or disapproved
| Input | Type | Description |
|---|---|---|
teamIdrequired | id (picked from your account) | Team ID |
channelIdrequired | id (picked from your account) | Channel ID |
messagerequired | long text | Message |
Details
- Id
microsoft_teams- Category
- Communication
- Tags
- chat, team, microsoft, enterprise
- Package
@activepieces/piece-microsoft-teams@0.3.13- Runs
- Through the integration runner