Send Teams File
The Send Teams File activity sends a file to a Microsoft Teams channel as part of your workflow.
Purpose
Use the Send Teams File activity to:
- Share report outputs with Teams channels
- Distribute generated files to team members
- Send workflow results or exports to Teams
- Automate file delivery to Microsoft Teams
Prerequisites
Teams Connection Required
- Must have a configured Teams connection (see Settings → Connections)
- OAuth token must have file write permissions
- Microsoft Graph API permissions for file operations
File Source
Files are typically generated by previous workflow activities, such as:
- Report book results (PDFs, Excel files)
- Exported data files
- Generated documents
Configuration
Connection Settings
- Teams Connection: Select a pre-configured Teams connection
Team and Channel Settings
- Team Name: The Microsoft Teams team to send to
- Channel Name: The channel within the team
Message Settings (Optional)
- Message: Optional text message to accompany the file
- Appears with the file in Teams
- Can include workflow parameters using
{ParameterName}
File Settings
- File Source: Select the file to send
- Typically uses output from a previous workflow activity
Context Variable (Optional)
- Message Timestamp: Store the timestamp of the file upload
- Can be used to track the upload
File Source Options
Report Book Result
Most common use case - sending generated reports:
File Source: Report Book Result
└─ Select from previous Report Book activity output
Workflow File
Files stored or generated within the workflow:
File Source: Workflow File
└─ Select from File Explorer or previous activity
Example Configurations
Send Report PDF
Teams Connection: Company Teams
Team: Finance
Channel: Reports
Message: Quarterly report for {Quarter} {Year}
File: Report Book Result (Quarterly_Report.pdf)
Send Data Export
Teams Connection: Company Teams
Team: Data Operations
Channel: Exports
Message: Daily data export - {RecordCount} records
File: Export Result (DailyExport.xlsx)
Automated Report Distribution
Teams Connection: Company Teams
Team: Management
Channel: Executive Reports
Message: 📊 Weekly summary - Generated {GenerationDate}
File: Report Book Result (Weekly_Summary.pdf)
Timestamp Context Key: FileUploadTimestamp
Common Use Cases
Scheduled Report Delivery
Workflow Schedule: Daily at 8 AM
└─ Generate Report Book
└─ Send Teams File
└─ Team: Operations
└─ Channel: Daily Reports
└─ Message: "Daily report for {Date}"
Data Export Distribution
1. Export Data Activity
2. Send Teams File
└─ Team: Data Team
└─ Channel: Exports
└─ File: Export Result
└─ Message: "Monthly export completed"
Error Log Sharing
1. Generate Error Report
2. Send Teams File
└─ Team: IT Support
└─ Channel: Alerts
└─ File: Error Log
└─ Message: "⚠️ Workflow errors for {Date}"
Supported File Types
Microsoft Teams generally supports:
- Documents: PDF, DOCX, PPTX, TXT
- Spreadsheets: XLSX, CSV
- Images: PNG, JPG, GIF
- Archives: ZIP
- Other: Most common file formats
Check Microsoft's current file size limits for Teams (typically 250 GB per file).
Message Formatting
The accompanying message supports:
- Plain text
- Workflow parameters:
{ParameterName} - Emojis: 📊 📈 📉
- Basic formatting
File Naming
- Files retain their original names from the source activity
- Report Book Results use the report book's configured file name
- Consider configuring meaningful file names in source activities
Best Practices
- Clear Messages: Provide context about the file content
- Appropriate Channels: Send to relevant team channels
- Naming Convention: Use consistent, descriptive file names
- Size Awareness: Be mindful of very large files
- Frequency: Avoid overwhelming channels with too many files
- Test First: Test deliveries in a test channel before production
- Error Handling: Plan for file generation failures
Usage Pattern with Report Books
Complete Report Delivery Flow
1. Report Book Activity
└─ Generate: Monthly_Report
└─ Format: PDF
└─ Store Output: MonthlyReportFile
2. Send Teams File
└─ Connection: Company Teams
└─ Team: Management
└─ Channel: Reports
└─ Message: "📊 Monthly Report - {MonthName} {Year}"
└─ File: MonthlyReportFile
3. Send Email (parallel)
└─ Also send via email to external stakeholders
Context Variable Usage
Store the message timestamp to:
- Track successful uploads
- Link multiple messages together
- Log file delivery for audit purposes
Timestamp Context Key: ReportUploadTimestamp
Later activities can reference: {ReportUploadTimestamp}
Limitations
- One File per Activity: Sends one file at a time
- File Size: Subject to Microsoft Teams file size limits
- Source Dependency: File must be generated by a previous activity
- No Direct Upload: Cannot upload files from external sources directly
- No Read Capability: Cannot read or list files programmatically
To send multiple files:
- Use multiple Send Teams File activities
- Or combine files into a ZIP archive first
OAuth Token Setup
Your IT team or Microsoft 365 admin needs to configure:
Required Microsoft Graph API Permissions:
Files.ReadWrite.All- Upload files to TeamsChannelMessage.Send- Post messages with filesTeam.ReadBasic.All- Read team informationChannel.ReadBasic.All- Read channel information
Setup Steps:
- Azure AD App Registration
- Add required Graph API permissions
- Generate OAuth token
- Configure in Una Settings → Connections
See Send Teams Message documentation for detailed OAuth setup instructions.
Troubleshooting
File Not Appearing in Teams
- Verify OAuth token has file write permissions
- Check team and channel names are correct
- Confirm file was successfully generated by previous activity
- Review workflow execution log for errors
- Verify file size is within Teams limits
- Ensure app has access to the team
Wrong File Sent
- Check file source configuration
- Verify correct previous activity is referenced
- Ensure file variable is populated
- Review file generation step for issues
Permission Errors
- Confirm app registration has
Files.ReadWrite.Allpermission - Ensure admin consent was granted
- Check token hasn't expired
- Verify app is added to the team
Connection Failed
- Validate OAuth token
- Check network connectivity to Microsoft Graph API
- Review Microsoft 365 service status
- Ensure token has correct scopes
Security Considerations
- Files uploaded to Teams are stored in SharePoint Online
- Consider data sensitivity before automated uploads
- Review Microsoft 365 data retention policies
- Monitor file sharing for compliance requirements
- Restrict app access to appropriate teams/channels only
- Consider encryption for sensitive files
Comparison to Slack File Upload
| Feature | Teams | Slack |
|---|---|---|
| File Upload | Yes | Yes |
| Accompanying Message | Yes | Yes |
| File Size Limit | Very High (250GB) | 1GB (free tier) |
| Storage Location | SharePoint Online | Slack Storage |
| OAuth Setup | Azure AD | Slack API |
Microsoft Graph API Details
This activity uses Microsoft Graph API:
- Endpoint:
/teams/{team-id}/channels/{channel-id}/messages - Method: POST with file attachment
- Files are uploaded to SharePoint document library
- Message links to uploaded file
Alternative File Delivery Methods
Large Files
For very large files:
- Direct SharePoint integration (if available)
- Email with OneDrive link
- Azure Blob Storage links
External Recipients
For recipients outside Teams:
- Use Email activity with attachments
- Generate secure download links
- Use SharePoint external sharing
High-Frequency Deliveries
For many files or frequent updates:
- Consider direct SharePoint document library integration
- Use Power Automate for advanced scenarios
- Batch files into archives
Current Implementation Status
Based on the transcript:
- Send Teams File is implemented
- Similar implementation to Send Teams Message
- Delegates to existing native Teams integration
- Uses the same connection configuration
Best Practice Pattern
# Comprehensive Report Distribution
1. Generate Report Book
└─ Output: QuarterlyReport.pdf
2. Parallel Distribution:
├─ Send Teams File
│ └─ Team: Internal Team
│ └─ Channel: Reports
│ └─ Message: "Q{Quarter} Report - Internal Review"
│
└─ Send Email
└─ To: External Stakeholders
└─ Attach: QuarterlyReport.pdf
└─ Subject: "Quarterly Report {Quarter} {Year}"
This pattern ensures both internal (Teams) and external (Email) stakeholders receive reports through appropriate channels.