Send Teams Message
The Send Teams Message activity sends a message to a Microsoft Teams channel from your workflow.
Purpose
Use the Send Teams Message activity to:
- Send notifications to Teams channels
- Post workflow status updates
- Share results or alerts with teams
- Integrate workflows with Teams communication
Prerequisites
Teams Connection Required
Before using this activity, you must configure a Teams connection:
- Navigate to Settings → Connections
- Create a new Teams Connection
- Configure OAuth token from your Microsoft Teams workspace
- Save the connection
Teams Configuration
- Must be done by your organization's IT team or Microsoft 365 administrator
- Requires creating a Microsoft App registration
- Generate an OAuth token with appropriate permissions
- Required Microsoft Graph API permissions
Configuration
Connection Settings
- Teams Connection: Select a pre-configured Teams connection from the dropdown
Channel Settings
- Team Name: The name of the Microsoft Teams team
- Channel Name: The name of the channel within the team
- Similar to Slack, identify the target location for the message
Message Settings
- Message Text: The message content to send
- Parameter Support: Can include workflow variables using
{ParameterName}
Example Configurations
Simple Notification
Teams Connection: Company Teams
Team: Data Operations
Channel: General
Message: Workflow completed successfully!
Status Update with Parameters
Teams Connection: Company Teams
Team: Finance
Channel: Reporting
Message: Monthly report generated for {MonthName}. Total records: {RecordCount}
Alert Message
Teams Connection: Company Teams
Team: IT Operations
Channel: Alerts
Message: ⚠️ Workflow error in {WorkflowName} - {ErrorMessage}
Message Formatting
Teams supports various formatting options:
- Emojis: Standard emoji characters (😀 ✅ ⚠️)
- Mentions: User and channel mentions (format depends on Teams API)
- Line Breaks: Use standard line breaks in message text
- URLs: Automatically detected and made clickable
Common Use Cases
Workflow Notifications
Message: 🚀 Starting data processing workflow for {ClientName}
Completion Alerts
Message: ✅ Data load completed successfully. {RecordCount} records processed.
Error Reports
Message: ❌ Error in workflow {WorkflowName}: {ErrorDetails}
Status Updates
Message: 📊 Processing batch {CurrentBatch} of {TotalBatches}
Comparison to Slack
Similarities
- Both send messages to channels
- Both support workflow parameters
- Both require OAuth connection configuration
- Both integrate with team communication platforms
Differences
| Feature | Teams | Slack |
|---|---|---|
| Message Reading | Not available | Read Slack Message activity |
| Markdown Support | Basic | Full markdown support |
| File Sending | Separate activity | Separate activity |
| Formatting | Limited | More extensive |
Known Limitations
No Message Reading
- Unlike Slack, Teams does not have a Read Message activity
- Cannot implement interactive request/response patterns
- No ability to read user replies programmatically
- This was a technical limitation during implementation
Workarounds for Interactivity
For workflows requiring user input:
- Use Email activity for responses
- Use Action/Approval activities in Una
- Consider Slack if interactive patterns are required
- Use Teams for notifications only
OAuth Token Setup Guide
Your IT team or Microsoft 365 admin needs to:
-
Register App in Azure AD
- Go to Azure Portal → App Registrations
- Create new registration
- Name the app (e.g., "Una Workflows")
-
Configure API Permissions
- Add Microsoft Graph permissions
- Required delegated permissions:
ChannelMessage.Send- Send messages to channelsTeam.ReadBasic.All- Read basic team infoChannel.ReadBasic.All- Read basic channel info
-
Generate Client Secret
- Create a client secret
- Copy the secret value
- Store securely
-
Get OAuth Token
- Follow Microsoft's OAuth 2.0 flow
- Obtain token with required permissions
- Paste token into Una Teams Connection settings
-
Grant Consent
- Admin consent may be required
- Grant access to the Una application
Connection Configuration
In Una Settings → Connections:
Connection Type: Teams
Connection Name: Company Teams
OAuth Token: [Paste token from Azure AD]
Detailed configuration instructions are available in the connection setup dialog.
Best Practices
- Clear Messages: Provide context about workflow events
- Appropriate Channels: Send to relevant team channels
- Include Parameters: Add relevant workflow data to messages
- Use Emojis: Visual indicators help messages stand out
- Avoid Spam: Don't overwhelm channels with too many messages
- Test First: Test in a test team/channel before production
Usage Patterns
Simple Notification Flow
1. Data Processing Activity
2. Send Teams Message
└─ Message: "Processing completed for {ClientName}"
Multi-Channel Notification
1. Workflow Completion
2. Send Teams Message (to Operations)
└─ Message: "Workflow completed"
3. Send Teams Message (to Management)
└─ Message: "Summary: {TotalRecords} records processed"
Error Handling
1. Try: Data Processing
2. On Error:
└─ Send Teams Message
└─ Channel: Alerts
└─ Message: "Error: {ErrorMessage}"
Troubleshooting
Message Not Appearing
- Verify OAuth token is valid and has correct permissions
- Check team and channel names are correct (case-sensitive)
- Ensure app has access to the team
- Review workflow execution log for errors
- Verify token hasn't expired
Permission Errors
- Confirm app registration has required API permissions
- Ensure admin consent was granted
- Check token includes necessary scopes
- Verify app is added to the team
Connection Failed
- Validate OAuth token format
- Check token expiration date
- Ensure network connectivity to Microsoft Graph API
- Review Microsoft 365 service status
Security Notes
- OAuth token provides access to your Teams workspace
- Restrict token permissions to minimum required
- Rotate tokens periodically according to policy
- Monitor app activity in Azure AD logs
- Don't share tokens in workflow parameters or logs
- Store tokens securely in connection configuration only
Microsoft Graph API
This activity uses Microsoft Graph API behind the scenes:
- Endpoint:
/teams/{team-id}/channels/{channel-id}/messages - Method: POST
- API Documentation: Microsoft Graph Teams API
Alternative Communication Methods
If Teams integration doesn't meet your needs:
For Interactive Workflows:
- Use Una's built-in Action/Approval activities
- Send Email for responses
- Consider Slack for request/response patterns
For File Sharing:
- Use Send Teams File activity
- Email attachments
- SharePoint integration
For Rich Content:
- Generate and attach report books
- Use Email with HTML formatting
- Create SharePoint pages
Current Implementation Status
According to the transcript:
- Send Teams Message is implemented and working
- Tested during development
- No known issues reported
- Limited post-implementation testing by clients
Feedback Welcome
If you encounter issues or have suggestions for Teams integration:
- Contact Una Software support
- Document specific use cases
- Share feedback on functionality needs
- Report any permission or connectivity issues