4. Get the Teams
Add a Gallery and display the Teams:
Items = SortByColumns(
MicrosoftTeams.GetAllTeams().value,
"displayName",
Ascending
)
Add 2 text labels
ThisItem.displayName
ThisItem.description
Gallery.OnSelect
Set(glb_selTeams,ThisItem)
5. Get the Channels
Add another Gallery and display the Channels of the previously
selected Team (in variable glb_selTeams):
Items
= MicrosoftTeams.GetChannelsForGroup(glb_selTeams.id).value
Add a text label
ThisItem.displayName
Gallery.OnSelect
Set(glb_selChannel,ThisItem))
6. Get the Messages
Add another Gallery and display the Messages of the previously
selected Channel (in variable glb_selChannel):
Items = MicrosoftTeams.GetMessagesFromChannel(glb_selTeams.id,
glb_selChannel.id).value
Add 2 html-text labels
ThisItem.subject
ThisItem.body.content
Gallery.OnSelect
Set(glb_selMessage,ThisItem);
ClearCollect(collConversation,ThisItem)
7. Display the complete message
Add a text label:
Text = glb_selMessage.subject
Add a html-text label:
HtmlText = glb_selMessage.body.content
8. Post a Message to a Channel
Add a text input control:
Add a Rich Text Editor control:
Add a button control
Button.OnSelect = MicrosoftTeams.PostMessageToChannelV3(
glb_selTeams.id,
glb_selChannel.id,
{
content: rte_Body.HtmlText,
contentType: 1 // 0=text; 1=html
},
{subject: ti_subject}
)
9. Known issues and limitations
The Microsoft Teams "When a new channel message is added" trigger only fires when root
messages are added in the channel. Replies to an existing channel message will not result in
the trigger event firing.
The message size limit for the "Post a message" action is approximately 28KB. This encompasses
all HTML elements like text, images, links, tables, mentions and so on. If the message exceeds
28KB the action will fail with an error stating: "Request Entity too large"
Source: https://docs.microsoft.com/en-us/connectors/teams/