CloudSharePoint & Cloud BridgingAutomated

File Alert Demo

Demo flow that monitors a SharePoint document library for new or modified files matching a filter and posts an adaptive card alert to a Teams channel with file metadata and a direct link.

Members OnlySign in or create a free account to download this solution.

Overview

Watches a configured SharePoint document library, reads the new file's properties when an item is created, and posts a notification to a Teams channel. Minimal, reliable SharePoint→Teams alert pattern.

**Flow ID:** ef716cf9-172b-f111-8341-6045bd0052fe • **State:** Off

Use Case

Teams collaborate on documents in SharePoint but live in Teams. Email subscriptions are noisy. This flow keeps the team in the loop where they already work.

**Key Benefits:** real-time visibility; all values configurable via env vars; minimal action count; Teams PostMessage richer than email.

Flow Architecture

Trigger: **When a file is created in a folder - FlowLibs File Alerts** (SharePoint OnNewFile).

1. Init 4 vars (site URL, library, Teams channel + group)
2. **Get file properties** (SharePoint GetFileItem) — pulls full metadata
3. **Post message in a chat or channel** (Teams) — formatted message announcing new file with link + author

*Note: SharePoint is currently a direct connection — promote to connection ref before production.*

Environment Variables

VariableSchema NameTypeDefaultPurpose
SharePoint Site URLflowlibs_SharePointSiteURLString(none)Absolute URL of the source SharePoint site
File Alerts Library Nameflowlibs_FileAlertsLibraryNameString(none)Display name of the library to watch
Teams Group IDflowlibs_TeamsGroupIdString(none)M365 Group / Team GUID
Teams Channel IDflowlibs_TeamsChannelIdString(none)Channel within the team

Connectors & Connections

ConnectorAPI NameConnection FormatUsage
SharePointshared_sharepointonlineDirect connection (not promoted to ref)OnNewFile trigger + GetFileItem
Microsoft Teamsshared_teamsflowlibs_sharedteams_8ba46PostMessageToChannel — new-file notification

Customization Guide

1. Import; set 4 env vars; promote SharePoint to connection ref; update Teams ref; turn on.

**Common Modifications:** filter by file type via Condition with endsWith(); switch to adaptive cards; email fallback via Outlook; group multiple files into Recurrence digest; audit logging via Create item; promote message template to env var.

Key Expressions

- @parameters('flowlibs_SharePointSiteURL') — site URL
- @outputs('Get_file_properties_-_Get_New_File_Details')?['body/{FilenameWithExtension}'] — file name
- @outputs('Get_file_properties_-_Get_New_File_Details')?['body/{Link}'] — file link

File Alert Demo — FlowLibs | FlowLibs