Working with SharePoint documents

Intermediate Power Automate

Dani Kahil

Solution Architect | Microsoft MVP

SharePoint document libraries in a nutshell

nanobanana: A vertical SharePoint hierarchy tree — site contains a list and a library, library nests course folder and Contract Files folder containing a PDF

 

  • A site contains one or more libraries
  • A library holds files (often in folders)
  • Each file has a unique URL
  • Functions: Get files, Get file content, Get file metadata using path, and more
Intermediate Power Automate

Matching a row to its file

nanobanana: A Contracts list row with a highlighted PdfFile column resolves via Get file metadata using path to a SharePoint file with the Link to item token exposed

 

  • Each row carries the file's URL or path
  • The flow reads the URL, asks SharePoint for the file
  • No naming convention needed; the URL is the truth
Intermediate Power Automate

Get file metadata using path

 

screenshot_get_file_metadata: The Power Automate SharePoint "Get file metadata using path" action expanded, showing the Site Address and File Path input fields populated, and the action card revealed.

 

  • Pass the Site Address and File Path
  • Returns metadata, not the file contents
  • Surfaces the {Link to item} token
Intermediate Power Automate

Link or attach?

$$

$$

  • Permissions enforced on click
  • Always the current version
  • Re-checks access on forward

$$

❌ Attached copy

$$

  • Frozen at send
  • Permissions bypassed
  • Leaks the file on forward
Intermediate Power Automate

The permissions trap

 

screenshot_sharepoint_access_denied: A real SharePoint "Access denied" / "You need permission to access this site" page in the browser, shown after clicking a link to a document the user has no permission to open.

 

  • A working link only works for people with access
  • The flow doesn't grant access - it sends a URL
  • Use Share-with or library permissions to enable recipients
Intermediate Power Automate

Let's practice!

Intermediate Power Automate

Preparing Video For Download...