Microsoft Teams
Microsoft Teams is a collaboration platform that combines workplace chat, video meetings, file storage, and application integration.
Categories: Communication
Type: microsoftTeams/v1
Connections
Version: 1
OAuth2 Authorization Code
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| clientId | Client Id | STRING | true | |
| clientSecret | Client Secret | STRING | true | |
| tenantId | Tenant Id | STRING | true |
Connection Setup
Create OAuth 2.0 Application
Creation of OAuth 2.0 application is documented here.
Grant Necessary Permissions
- Open the Azure Portal: https://portal.azure.com/
- Click on App registrations.
- Click on All applications.
- Click on application you want to connect to Microsoft Teams.
- Click on API permissions.
- Click on Microsoft Graph (1).
- Select following scopes:
- Channel.Create
- Channel.ReadBasic.All
- ChannelMessage.Send
- Chat.ReadWrite
- Chat.Read
- ChatMember.Read
- Team.ReadBasic.All
- offline_access
- After selecting all the scopes click on Update permissions
Grant Necessary Permissions - For Microsoft OneDrive (needed for sending attachments)
- Open the Azure Portal: https://portal.azure.com/
- Click on App registrations.
- Click on All applications.
- Click on application you want to connect to Microsoft OneDrive.
- Click on API permissions.
- Click on Microsoft Graph (1).
- Select following scopes:
- Files.Read
- Files.ReadWrite.All
- offline_access
- After selecting all the scopes click on Update permissions
Actions
Create Channel
Name: createChannel
Creates a new channel within a team.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| teamId | Team ID | STRING | ID of the team where the channel will be created. | true |
| displayName | Channel Name | STRING | true | |
| description | Description | STRING | Description for the channel. | false |
Example JSON Structure
{
"label" : "Create Channel",
"name" : "createChannel",
"parameters" : {
"teamId" : "",
"displayName" : "",
"description" : ""
},
"type" : "microsoftTeams/v1/createChannel"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| @odata.context | STRING | The OData context URL that indicates the metadata for the response. |
| id | STRING | ID of the channel. |
| createdDateTime | DATE_TIME | The date and time when the channel was created. |
| displayName | STRING | Name of the channel that will appear to the user in Microsoft Teams. |
| description | STRING | Description of the channel. |
| isFavoriteByDefault | BOOLEAN Optionstrue, false | Indicates whether the channel is marked as favorite by default. |
| STRING | The email address of the channel if it is enabled to receive emails. | |
| webUrl | STRING | URL to access the channel in a web browser. |
| membershipType | STRING | The type of channel membership, e.g., standard or private. |
| isArchived | BOOLEAN Optionstrue, false | Indicates whether the channel is archived. |
Output Example
{
"@odata.context" : "",
"id" : "",
"createdDateTime" : "2021-01-01T00:00:00",
"displayName" : "",
"description" : "",
"isFavoriteByDefault" : false,
"email" : "",
"webUrl" : "",
"membershipType" : "",
"isArchived" : false
}Find Team ID
To find the Team ID, click here.
Send Channel Message
Name: sendChannelMessage
Sends a message to a channel. Sending attachments is supported with Message Text Format is set to "html".
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| teamId | Team ID | STRING | ID of the team where the channel is located. | true |
| channelId | Channel ID | STRING Depends OnteamId | Channel to send message to. | true |
| contentType | Message Text Format | STRING Optionstext, html | true | |
| content | Message Text | STRING | true | |
| attachments | Attachments | ARRAY Items[STRING($attachment)] | The attachments to send with the message. The file to attach must already be in SharePoint. | false |
Example JSON Structure
{
"label" : "Send Channel Message",
"name" : "sendChannelMessage",
"parameters" : {
"teamId" : "",
"channelId" : "",
"contentType" : "",
"content" : "",
"attachments" : [ "" ]
},
"type" : "microsoftTeams/v1/sendChannelMessage"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | Unique identifier of the message. |
| replyToId | STRING | ID of the parent message if this is a reply. |
| etag | STRING | Entity tag for versioning. |
| messageType | STRING | Type of the message. |
| createdDateTime | STRING | Timestamp when the message was created. |
| lastModifiedDateTime | STRING | Timestamp when the message was last modified. |
| lastEditedDateTime | STRING | Timestamp when the message was last edited. |
| deletedDateTime | STRING | Timestamp when the message was deleted. |
| subject | STRING | Subject/title of the message. |
| summary | STRING | Summary of the message. |
| chatId | STRING | ID of the chat. |
| importance | STRING | Importance level of the message. |
| locale | STRING | Locale of the message. |
| webUrl | STRING | Web URL to access the message. |
| policyViolation | STRING | Policy violation details if applicable. |
| eventDetail | STRING | Event details associated with the message. |
| from | OBJECT Properties{{}(application), {}(device), {STRING(@odata.type), STRING(id), STRING(displayName), STRING(userIdentityType), STRING(tenantId)}(user)} | Information about the sender. |
| body | OBJECT Properties{STRING(contentType), STRING(content)} | Plaintext/HTML representation of the content of the chat message. |
| channelIdentity | OBJECT Properties{STRING(teamId), STRING(channelId)} | Channel identity where the message was posted. |
| attachments | ARRAY Items[] | List of attachments included in the message. |
| mentions | ARRAY Items[] | List of mentions in the message. |
| reactions | ARRAY Items[] | List of reactions to the message. |
Output Example
{
"id" : "",
"replyToId" : "",
"etag" : "",
"messageType" : "",
"createdDateTime" : "",
"lastModifiedDateTime" : "",
"lastEditedDateTime" : "",
"deletedDateTime" : "",
"subject" : "",
"summary" : "",
"chatId" : "",
"importance" : "",
"locale" : "",
"webUrl" : "",
"policyViolation" : "",
"eventDetail" : "",
"from" : {
"application" : { },
"device" : { },
"user" : {
"@odata.type" : "",
"id" : "",
"displayName" : "",
"userIdentityType" : "",
"tenantId" : ""
}
},
"body" : {
"contentType" : "",
"content" : ""
},
"channelIdentity" : {
"teamId" : "",
"channelId" : ""
},
"attachments" : [ ],
"mentions" : [ ],
"reactions" : [ ]
}Find Team ID and Channel ID
To find the Team ID, click here.
To find the Channel ID, click here.
Send Direct Message
Name: sendDirectMessage
Sends a direct message in an existing chat. Sending attachments is supported with Message Text Format set to "html".
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| chatId | Chat ID | STRING | true | |
| contentType | Message Text Format | STRING Optionstext, html | true | |
| content | Message Text | STRING | true | |
| attachments | Attachments | ARRAY Items[STRING($attachment)] | The attachments to send with the message. The file to attach must already be in SharePoint. | false |
Example JSON Structure
{
"label" : "Send Direct Message",
"name" : "sendDirectMessage",
"parameters" : {
"chatId" : "",
"contentType" : "",
"content" : "",
"attachments" : [ "" ]
},
"type" : "microsoftTeams/v1/sendDirectMessage"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | Unique identifier of the message. |
| replyToId | STRING | ID of the parent message if this is a reply. |
| etag | STRING | Entity tag for versioning. |
| messageType | STRING | Type of the message. |
| createdDateTime | STRING | Timestamp when the message was created. |
| lastModifiedDateTime | STRING | Timestamp when the message was last modified. |
| lastEditedDateTime | STRING | Timestamp when the message was last edited. |
| deletedDateTime | STRING | Timestamp when the message was deleted. |
| subject | STRING | Subject/title of the message. |
| summary | STRING | Summary of the message. |
| chatId | STRING | ID of the chat. |
| importance | STRING | Importance level of the message. |
| locale | STRING | Locale of the message. |
| webUrl | STRING | Web URL to access the message. |
| policyViolation | STRING | Policy violation details if applicable. |
| eventDetail | STRING | Event details associated with the message. |
| from | OBJECT Properties{{}(application), {}(device), {STRING(@odata.type), STRING(id), STRING(displayName), STRING(userIdentityType), STRING(tenantId)}(user)} | Information about the sender. |
| body | OBJECT Properties{STRING(contentType), STRING(content)} | Plaintext/HTML representation of the content of the chat message. |
| channelIdentity | OBJECT Properties{STRING(teamId), STRING(channelId)} | Channel identity where the message was posted. |
| attachments | ARRAY Items[] | List of attachments included in the message. |
| mentions | ARRAY Items[] | List of mentions in the message. |
| reactions | ARRAY Items[] | List of reactions to the message. |
Output Example
{
"id" : "",
"replyToId" : "",
"etag" : "",
"messageType" : "",
"createdDateTime" : "",
"lastModifiedDateTime" : "",
"lastEditedDateTime" : "",
"deletedDateTime" : "",
"subject" : "",
"summary" : "",
"chatId" : "",
"importance" : "",
"locale" : "",
"webUrl" : "",
"policyViolation" : "",
"eventDetail" : "",
"from" : {
"application" : { },
"device" : { },
"user" : {
"@odata.type" : "",
"id" : "",
"displayName" : "",
"userIdentityType" : "",
"tenantId" : ""
}
},
"body" : {
"contentType" : "",
"content" : ""
},
"channelIdentity" : {
"teamId" : "",
"channelId" : ""
},
"attachments" : [ ],
"mentions" : [ ],
"reactions" : [ ]
}Triggers
New Channel Message
Name: newChannelMessage
Triggers when new message is received in selected channel.
Type: POLLING
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| teamId | Team ID | STRING | ID of the team where the channel is located. | true |
| channelId | Channel ID | STRING Depends OnteamId | Channel to monitor for new messages. | true |
Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | Unique identifier of the message. |
| replyToId | STRING | ID of the parent message if this is a reply. |
| etag | STRING | Entity tag for versioning. |
| messageType | STRING | Type of the message. |
| createdDateTime | STRING | Timestamp when the message was created. |
| lastModifiedDateTime | STRING | Timestamp when the message was last modified. |
| lastEditedDateTime | STRING | Timestamp when the message was last edited. |
| deletedDateTime | STRING | Timestamp when the message was deleted. |
| subject | STRING | Subject/title of the message. |
| summary | STRING | Summary of the message. |
| chatId | STRING | ID of the chat. |
| importance | STRING | Importance level of the message. |
| locale | STRING | Locale of the message. |
| webUrl | STRING | Web URL to access the message. |
| policyViolation | STRING | Policy violation details if applicable. |
| eventDetail | STRING | Event details associated with the message. |
| from | OBJECT Properties{{}(application), {}(device), {STRING(@odata.type), STRING(id), STRING(displayName), STRING(userIdentityType), STRING(tenantId)}(user)} | Information about the sender. |
| body | OBJECT Properties{STRING(contentType), STRING(content)} | Plaintext/HTML representation of the content of the chat message. |
| channelIdentity | OBJECT Properties{STRING(teamId), STRING(channelId)} | Channel identity where the message was posted. |
| attachments | ARRAY Items[] | List of attachments included in the message. |
| mentions | ARRAY Items[] | List of mentions in the message. |
| reactions | ARRAY Items[] | List of reactions to the message. |
JSON Example
{
"label" : "New Channel Message",
"name" : "newChannelMessage",
"parameters" : {
"teamId" : "",
"channelId" : ""
},
"type" : "microsoftTeams/v1/newChannelMessage"
}Find Team ID and Channel ID
To find the Team ID, click here.
To find the Channel ID, click here.
New Direct Message
Name: newDirectMessage
Triggers when new direct message is received.
Type: POLLING
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| chatId | Chat ID | STRING | true |
Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| id | STRING | Unique identifier of the message. |
| replyToId | STRING | ID of the parent message if this is a reply. |
| etag | STRING | Entity tag for versioning. |
| messageType | STRING | Type of the message. |
| createdDateTime | STRING | Timestamp when the message was created. |
| lastModifiedDateTime | STRING | Timestamp when the message was last modified. |
| lastEditedDateTime | STRING | Timestamp when the message was last edited. |
| deletedDateTime | STRING | Timestamp when the message was deleted. |
| subject | STRING | Subject/title of the message. |
| summary | STRING | Summary of the message. |
| chatId | STRING | ID of the chat. |
| importance | STRING | Importance level of the message. |
| locale | STRING | Locale of the message. |
| webUrl | STRING | Web URL to access the message. |
| policyViolation | STRING | Policy violation details if applicable. |
| eventDetail | STRING | Event details associated with the message. |
| from | OBJECT Properties{{}(application), {}(device), {STRING(@odata.type), STRING(id), STRING(displayName), STRING(userIdentityType), STRING(tenantId)}(user)} | Information about the sender. |
| body | OBJECT Properties{STRING(contentType), STRING(content)} | Plaintext/HTML representation of the content of the chat message. |
| channelIdentity | OBJECT Properties{STRING(teamId), STRING(channelId)} | Channel identity where the message was posted. |
| attachments | ARRAY Items[] | List of attachments included in the message. |
| mentions | ARRAY Items[] | List of mentions in the message. |
| reactions | ARRAY Items[] | List of reactions to the message. |
JSON Example
{
"label" : "New Direct Message",
"name" : "newDirectMessage",
"parameters" : {
"chatId" : ""
},
"type" : "microsoftTeams/v1/newDirectMessage"
}What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
Additional Instructions
How to find Team ID
You can get your Team ID from your Microsoft Teams:
- Open Microsoft Teams
- Go to Teams and Channels
- Click the three dots (...) next to the team name
- Select Copy link
- You'll get URL like:
https://teams.microsoft.com/l/team/19%3aabc123def456%40thread.tacv2/conversations?groupId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&tenantId=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy - The Team ID is the value of:
groupId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
How to find Channel ID
You can get your Channel ID from your Microsoft Teams:
- Open Microsoft Teams
- Go to Teams and Channels
- Click the three dots (...) next to the channel name
- Select Copy link
- You'll get URL like:
https://teams.microsoft.com/l/channel/19%3abc8e04002356415884ba1769f437de36%40thread.tacv2/General?groupId=e95fd37a-caad-496e-8a89-762f0aa441bf&tenantId=43f519c0-e5a6-438f-808f-6491be63b3be - The Channel ID is the value after /l/channel/:
19:bc8e04002356415884ba1769f437de36@thread.tacv2 - Important notice is that string in the URL is URL encoded
19%3abc8e04002356415884ba1769f437de36%40thread.tacv2so you will have to decode it to get19:bc8e04002356415884ba1769f437de36@thread.tacv2
How is this guide?
Last updated on
Microsoft SharePoint
Microsoft SharePoint is a web-based collaborative platform that integrates with Microsoft Office, providing document management, intranet, and content management features for organizations.
Microsoft To Do
Microsoft To Do is a cloud-based task management application that helps users organize, prioritize, and track tasks across devices with features like lists, reminders, and collaboration.