Teams团队/频道新增文件时如何自动通知成员?是否有对应机器人?
Great question! You absolutely can set up automatic notifications (including emails) for new files added to a Teams team or channel—no need to rely on manual "Start a Conversation" actions every time. Here are two practical, reliable approaches to make this happen:
1. Power Automate (No-Code/Low-Code Solution)
This is the simplest option for most users, as it integrates natively with Microsoft 365 tools:
- Start a new flow: Pick the trigger
When a file is created (properties only), then select the SharePoint site linked to your Teams team, plus the specific document library (or folder, if targeting a single channel—each Teams channel maps to a unique folder in the site's library). - Pull file details: Add the
Get file contentaction to grab metadata like the file name, uploader, and shareable link. - Retrieve team members: Use the
Get group membersaction (since Teams teams are Microsoft 365 groups) to dynamically fetch all team members' email addresses. - Send automated email: Add the
Send an email (V2)action. Customize the subject (e.g.,New File Added to [Team Name] - [Channel Name]: {File Name}) and body to include the file link, uploader name, and any other relevant context.
Pro tip: You can add filters (like only triggering for specific file types) or narrow the recipient list to target specific roles instead of all members.
2. Custom Teams Bot (For Advanced Customization)
If you need full control over notification logic or want to combine email alerts with in-Teams messages, build a bot using the Microsoft Bot Framework:
- Register your bot in the Azure Portal and grant it permissions to read Teams channel activities and access SharePoint files.
- Set up a webhook to listen for
fileCreatedevents in your target Teams channel. - When a new file is detected, use the Microsoft Graph API to fetch the team's member list and send emails via the Graph's mail endpoint.
This approach requires some development work, but it lets you tailor the experience exactly to your needs—like adding approval workflows, custom branding, or conditional notifications based on file content.
Key Notes
- Ensure the account running your flow/bot has sufficient permissions: access to the Teams team's SharePoint library, permission to read group members, and the ability to send emails on behalf of a valid account.
- For channel-specific alerts, double-check you're targeting the correct folder in the SharePoint library (each channel creates a unique folder by default).
内容的提问来源于stack exchange,提问作者SamJ




