- Overview
- Adobe Sign
- Alteryx
- Amazon Comprehend
- Amazon Connect
- Amazon Rekognition
- Amazon Textract
- Box
- Release notes
- About the Box activity package
- Fix XAML after package update
- Project compatibility
- Setup
- Technical references
- Box Scope
- Commit Session
- Create File Version Session
- Create Upload Session
- Upload Part
- Delete Old Version
- Get Versions
- Promote Version
- Upload File Version
- Copy File
- Delete File
- Download File
- Get File Comments
- Get File Info
- Get File Info Details
- Get File Lock Info
- Lock File
- Move File
- Unlock File
- Upload File
- Copy Folder
- Create Folder
- Delete Folder
- Get Folder Info
- Get Folder Items
- Rename Folder
- Search For Content
- Execute Method
- Cognitive
- DocuSign
- Release notes
- About the DocuSign activity package
- Project compatibility
- Setup
- DocuSign Scope
- Invoke DocuSign Operation
- Create Envelope
- Create Envelope And Send
- Create Envelope From Template
- Create Envelope Recipients
- Get Document
- Get Documents
- Get Envelope
- Get Form Data
- Send Envelope
- Update Envelope
- List Attachments
- List Custom Fields
- List Documents
- List Envelope Status Changes
- List Recipients
- Create Bulk Send List
- Create Bulk Send Request
- Get Bulk Send List
- Get Bulk Send Lists
- Create Template Custom Fields
- Create Template Recipients
- Get Template
- List Templates
- Google Vision
- Jira
- Release notes
- About the Jira activity package
- Project compatibility
- Setup
- Jira Scope
- Execute Method
- Add Attachment
- Delete Attachment
- Download Attachment
- Get Attachments
- Add Comment
- Delete Comment
- Get Comments
- Create Component
- Delete Component
- Get Components
- Search Dashboards
- Create Filter
- Get Filters
- Create Issue Link
- Delete Issue Link
- Get Issue Link Types
- Get Issue Links
- Add Watcher
- Assign Issue
- Clone Issue
- Create Issue
- Delete Issue
- Get Issue
- Get Watchers
- Remove Watcher
- Search Issues Using JQL
- Transition Issue
- Update Issue
- Create Project
- Delete Project
- Get Project Types
- Get Projects
- Update Project
- Get Transitions
- Create User
- Delete User
- Find Users
- Marketo
- Microsoft Dynamics
- Microsoft Dynamics Finance and Operations
- Microsoft Teams
- Release notes
- Project compatibility
- Setup
- Quickstart - Get teams, channels, and messages
- Quickstart - Get chats and send message
- Microsoft Translator
- Microsoft Vision
- Oracle Integration Cloud
- Oracle NetSuite
- Salesforce
- Release notes
- About the Salesforce activity package
- Project compatibility
- Setup
- Quickstart
- Salesforce Application Scope
- Create Bulk API Job
- Get Bulk API Job
- Get Bulk API Job Results
- Start or Abort Bulk API Job
- Assign File
- Download File
- Upload File
- Composite Request
- Delete Record
- Get List View Records
- Get Record
- Insert Record
- Update Record
- Upsert Record
- Execute Report
- Execute SOQL
- Format Column Names
- Format Labels And Values
- Lightning REST API Request
- Search
- SAP BAPI
- ServiceNow
- Slack
- Smartsheet
- Release notes
- About the Smartsheet activity package
- Project compatibility
- Setup
- Technical references
- Quickstart: Working With rows
- Smartsheet Application Scope
- Attach File
- Attach URL
- Delete Attachment
- Get Attachment
- List Attachments
- Add Comment
- Delete Comment
- Get Comment
- List Discussions
- Copy Folder
- Create Folder
- Delete Folder
- Get Folder
- List Folders
- Add Group Members
- Get Group
- List Groups
- Remove Group Member
- Get Report
- List Reports
- Add Rows
- Copy Rows
- Create Discussion on Row
- Delete Rows
- Get Row
- List Rows
- Move Rows
- Update Rows
- Copy Sheet
- Create Sheet
- Create Sheet From Template
- Download Sheet
- Get Sheet
- List Sheets
- Update Sheet
- Add User
- Get User
- List Users
- Remove User
- Copy Workspace
- Create Workspace
- List Workspaces
- Import Sheet From CSV / XLSX
- Invoke Smartsheet Operation
- Search Activity
- Send Via Email
- Share Object
- SuccessFactors
- Tableau
- Twilio
- Workato
- Workday

Classic Integrations Activities
Quickstart - Get chats and send message
linkOverview
linkThe purpose of this guide is to help you create a working sample that uses different Microsoft Teams activities, including the Get Chats, Get Chat Members, Send Message and Get Message activities.
This working sample enables you to quickly verify the connection to your registered Microsoft Teams application and get familiar with the activity's input/output datatypes.
After completing the steps in this guide, you'll have an automation sequence that does the following:
- Establishes a connection to your registered Microsoft Teams application (Microsoft Teams Scope).
- Retrieves all of your chats (Get Chats).
- Retrieves the members of each of your chats (For Each and Get Chat Members).
- Locates the chat that includes a specific chat member and sends a message (If, Assign, and Send Message.
-
Verifies the message was sent successfully by retrieving and outputting the message Id and message content Get Message and Write Line).
Prerequisites
linkBefore you begin:
- Complete the Microsoft Teams Setup steps.
- Create or use an existing chat, send at least one chat message.
Steps
linkBuild your project
- Add the Microsoft Teams Scope activity to your project.
-
Enter the ApplicationId for your registered application.
- For more information, see the Register your application section in Setup guide.
-
From the AuthenticationType drop-down list, select the applicable authentication flow (e.g., InteractiveToken).
- For more information, see the Unattended vs. Attended Automation in the Microsoft Teams Scope activity page.
-
Add the Get Chats activity after the Microsoft Teams Scope activity.
-
Create and enter a
Chat[]
variable for your Chats value (e.g., myChats).- When creating your variable, select Microsoft.Graph.Chat as the variable type.
- Add a For Each activity after the Get Chats activity.
- In the TypeArgument property, select Microsoft.Graph.Chat.
- In the Values property, enter the
Chat[]
variable you created for the Get Chats activity (e.g., myChats).
-
-
In the For Each activity, add an Assign.
- Create and enter a
String
variable for the To property (e.g., chatId) -
In Value property, enter item.Id.
- Creating and assigning the item.id value to this variable enables it to be used in a later For Each activity that has a different argument type.
- Add the Get Chat Members activity after the Assign activity.
- In the ChatId property, enter Item.Id to get the members for each chat.
-
Create and enter a
ConversationMember[]
variable for your ChatMembers value (e.g., myChatMembers).- When creating your variable, select Microsoft.Graph.ConversationMember as the variable type.
- Add another For Each activity after the Get Chat Members activity.
- In the TypeArgument property, select Microsoft.Graph.ConversationMember.
- In the Values property, enter the
ConversationMember[]
variable you created for the Get Chat Members activity (e.g., myChatMembers).
- Create and enter a
-
In the For Each activity, add an If activity.
- In the Condition property, enter a value to identify a specific chat by member (e.g., item.DisplayName="Sarah Connor")
-
In the Then sequence block, add the Send Message activity.
- In the ChatId property, enter the
String
variable you created for the Assign activity (e.g., chatId). - Enter your Body content that you want to send (e.g., "Just saying hi")
- In the BodyType property, enter BodyType.Text.
-
Create and enter a new
String
variable for your MessageId value (e.g., newMessageId)
- In the ChatId property, enter the
Test your project
-
To test that your activities retrieved your Chats, the Chat Members, and sent a Message, add a Write Line activity after the Send Message activity.
- In the Text property, enter the
String
variable you created for the Send Message activity (e.g., newMessageId)
- In the Text property, enter the
-
Add the Get Message activity after the Write Line activity.
- In the ChatId property, enter the
String
variable you created for the Assign activity (e.g., chatId). -
In the MessageId property, enter the
String
variable you created for the Send Message activity (e.g., newMessageId).3 . Create and enter aChatMessage
variable for your Message value (e.g., newMessage).- When creating your variable, select _Microsoft.Graph.ChatMessage_as the variable type.
- Add another Write Line activity after the Get Message activity.
- In the Text property, enter the
ChatMessage
variable you created for the Get Message activity and append .Body.Content to the end of it (e.g. newMessage.Body.Content)
- In the ChatId property, enter the
-
Click Run and verify the Output window includes your sent message Id and content.
You're done!
When you're ready, try the other Quickstart guides to get more familiar with the different Microsoft Teams activities.
To learn more about the Microsoft Teams activities (including example property inputs/outputs), see the following activity pages for a complete activity list and links to the activity detail pages.