Microsoft Teams Integration
Overview
The Microsoft Teams integration in Lamatic enables real-time message syncing, content extraction, and workflow automation using Teams data. Use it to build conversational intelligence flows, extract structured insights, and respond to user activity within your organization.
This integration connects to Microsoft Teams to sync messages and trigger workflows based on channel activity.
Features
✅ Key Functionalities
- Message Syncing: Automatically pulls messages from selected Teams channels
- Channel Monitoring: Detects new messages or replies in real-time
- Metadata Extraction: Captures message content, sender info, timestamps, and thread context
✅ Benefits
- Automates insights extraction from internal team conversations
- Enables question-answering and summarization from chat history
- Integrates chat content into RAG flows or custom workflows
- Triggers flows based on new messages or keywords
Available Functionality
Event Triggers
✅ Trigger flows based on new messages in a channel
✅ Schedule channel message syncing
Actions
✅ Extract message content and metadata
✅ Perform sentiment or entity analysis on chat messages
✅ Filter messages based on keywords, timestamps, or users
✅ Index message history for semantic search
Prerequisites
Before setting up the Microsoft Teams integration, ensure you have:
- A Microsoft 365 account with Microsoft Teams access
- Admin permission or appropriate app registration rights
- Your organization's Tenant ID from Microsoft Entra Admin Center
- Permissions granted for Teams Graph API scopes (
Channel.Read.All
,Chat.Read.All
, etc.)
Setup
Step 1: Set Up Microsoft 365 Credentials
- Get Tenant ID: Go to Microsoft Entra Admin Center (opens in a new tab)
- Navigate to Azure AD: Go to Azure Active Directory
- Copy Tenant ID: Under Tenant Information, copy the Directory ID
Ensure Teams Graph API permissions are enabled to allow access to messages, channels, and user metadata.
Step 2: Configure Teams Node
- Add Teams Node: Drag the Microsoft Teams node into your flow
- Enter Credentials: Provide your Microsoft 365 Tenant ID
- Select Team and Channel: Choose the team and channel you want to monitor
- Configure Filters: Apply filters for message types, keywords, or time ranges
Step 3: Test and Deploy
- Test Connection: Confirm the node can access Teams and list messages
- Set Trigger Conditions: Define keyword triggers or scheduled syncs
- Deploy Flow: Activate the flow to begin real-time or scheduled message processing
Configuration Reference
Trigger Node
Parameter | Description | Required | Default | Example |
---|---|---|---|---|
Credentials | Microsoft 365 credentials with Teams API access | ✅ | - | Microsoft 365 |
Conversation Type | Select the conversation type for the Teams node (e.g., Group Chat, Personal Chat, Channel). | ✅ | Bot Chat | Bot Chat , Group Chat , Channel |
Actions Node
Parameter | Description | Required | Default | Example |
---|---|---|---|---|
Credentials | Microsoft 365 credentials with Teams API access | ✅ | - | Microsoft 365 |
Conversation Type | Select the conversation type for the Teams node (e.g., Group Chat, Personal Chat, Channel). | ✅ | Chat | Chat , Channel |
Chat Operation | Select the operation for the Teams node (e.g., Send Message). | ✅ | Send Message | Send Message |
Chat ID | Select the chat from the list, by URL, or by ID (find the chat ID after "conversations/" in the URL) | ✅ | id | |
Message | The message to send | ✅ | ||
Include Powered By | Whether to include the powered by message | ❌ | true | true , false |
Troubleshooting
Common Issues
Problem | Solution |
---|---|
Authentication Failed | Confirm Tenant ID is correct and the app has necessary Teams Graph API permissions. |
Team or Channel Not Found | Verify that the provided team and channel names are correct and accessible. |
No Messages Fetched | Ensure recent messages exist and filters (e.g., keywords, sender) aren't overly restrictive. |
Permission Denied | Ensure your app has delegated or application permissions for Teams messages and channels. |
Real-time Trigger Not Working | Verify that webhook or change notification permissions are configured in Microsoft Graph. |
Debugging Steps
-
Verify Microsoft 365 Credentials
Ensure the Tenant ID and Microsoft 365 credentials are valid and have access to Teams API scopes. -
Check Team & Channel Access
Confirm your user account or registered app has permission to view and fetch messages from the selected Team and Channel. -
Validate Filters
Temporarily remove or simplify keyword and sender filters to check if messages are being pulled without them. -
Inspect Node Logs
Use Lamatic Flow logs to examine any errors, API failures, or permission issues. -
Test API Access via Graph Explorer
Use Microsoft Graph Explorer (opens in a new tab) to test reading channel messages with the same credentials. -
Check Sync Schedule Format
Verify yoursync_schedule
cron expression is valid using crontab.guru (opens in a new tab). -
Ensure Permissions Are Consented
In Microsoft Entra Admin Center, make sure Graph API permissions (likeChannelMessage.Read.All
) are granted and consented by an admin.