Skip to content

Navigation and file operations on SharePoint

Microsoft SharePoint • Microsoft Graph • Mindflow

This guide explains how to navigate SharePoint files and folders through Mindflow using Microsoft Graph steps (Sites + Files). It extends this page with the key identifiers you will see in Graph responses and how to chain them to list folders/files and download content.

Key concepts (Site ID, Drive ID, Drive Item ID)

Section titled “Key concepts (Site ID, Drive ID, Drive Item ID)”

When working with SharePoint content via Microsoft Graph, you will typically manipulate three identifiers:

  • Site ID
    • Identifies a SharePoint site (example: a team site such as https://…sharepoint.com/sites/Demo).
    • You usually obtain it first (from a prior step or an input variable), then use it to list drives.
  • Drive ID
    • Identifies a document library inside a site (Graph calls it a “drive”).
    • You obtain it by listing drives for a given site.
  • Drive item ID
    • Identifies an item inside a drive.
    • A drive item can be:
      • a folder (that you can list children for)
      • a file (that you can download / read metadata for)
    • Special case: root is a valid drive item reference representing the top-level of the drive.

Many Graph “drive item” responses include a @microsoft.graph.downloadUrl:

  • It is a pre-authenticated direct download link generated by Microsoft.
  • It typically expires, so you should avoid storing it long-term.
  • Best practice: generate / use it close to the moment you need to download.
  • In folder traversal flows, you will see fresh @microsoft.graph.downloadUrl values returned again when you list children and inspect individual items.

Section titled “Navigating sites and folders (typical chain)”

Below is the most common navigation pattern:

  1. List drives from a site (Sites)
  2. Pick the correct drive ID (document library)
  3. List children of a drive item (Files) starting from root or from a folder drive item ID
  4. For each returned item:
    • If it is a folder: keep its drive item ID to list deeper
    • If it is a file: use its metadata (including @microsoft.graph.downloadUrl) for file operations

Mindflow step: Microsoft Graph - Sites → “Get drives from sites (sites_ListDrives…)”

  • Site id (required)
    • The SharePoint site identifier you want to browse.

The response returns a list of drives (document libraries). Typical fields:

  • value[n].id → Drive ID (this is what you will pass to the Files steps)
  • value[n].name → Human-readable library name (example: Documents)
  • value[n].webUrl → The SharePoint URL for that library
  • value[n].driveType → Often documentLibrary

Example screenshots (sensitive data obfuscated)

Section titled “Example screenshots (sensitive data obfuscated)”
  • Screenshot 1 — List drives step (input): shows the “Get drives from sites …” step with the Site id field populated.

    Value n drivetype often documentlibrary

  • Screenshot 2 — List drives step (output): highlights the returned value[0].id (Drive ID), name, and webUrl.

    Value n drivetype often documentlibrary


Step 2 — List children from the drive root

Section titled “Step 2 — List children from the drive root”

Mindflow step: Microsoft Graph - Files → “List children of a driveItem”

  • Drive id (required)
    • Use the drive id returned by the previous step.
  • Drive item id (required)
    • Use root to start from the top level of the document library.

The response returns the items directly under that folder:

  • value[n].id → Drive item ID
  • value[n].name → File or folder name
  • value[n].folder → Present when the item is a folder
  • value[n].file → Present when the item is a file
  • value[n].webUrl → Browser link in SharePoint
  • value[n].@microsoft.graph.downloadUrl → Pre-authenticated download URL (ephemeral)

Example screenshots (sensitive data obfuscated)

Section titled “Example screenshots (sensitive data obfuscated)”

Add the screenshot(s) below:

  • Screenshot — Root children listing (input): shows Drive id = … and Drive item id = root.

    Value n microsoft graph downloadurl pre

  • Screenshot — Root children listing (output): highlights the returned value array and at least one item’s id, name, and (when present) @microsoft.graph.downloadUrl.

    Value n microsoft graph downloadurl pre

  • Screenshot — Additional children listing example (output with download URL): highlights the @microsoft.graph.downloadUrl field returned for a file item (example download link).

    Value n microsoft graph downloadurl pre


Step 3 — Traverse into a folder (repeatable)

Section titled “Step 3 — Traverse into a folder (repeatable)”

Mindflow step: Microsoft Graph - Files → “List children of a driveItem”

  • Drive id (required)
    • Same drive ID as before.
  • Drive item id (required)
    • Set to the folder’s value[n].id returned by the previous listing.

Same shape as the root listing, but scoped to that folder.

Example screenshots (sensitive data obfuscated)

Section titled “Example screenshots (sensitive data obfuscated)”

Add the screenshot(s) below:

  • Screenshot — Folder children listing (input): shows Drive item id set from the selected folder’s id (variable/token).

    Set folders value n id returned

  • Screenshot — Folder children listing (output): highlights the folder name (e.g., GRC Demo) and the items returned inside it.

    Set folders value n id returned


This section shows common file operations you can implement once you can navigate to the correct drive item.


Download a file (using @microsoft.graph.downloadUrl)

Section titled “Download a file (using @microsoft.graph.downloadUrl)”

A common pattern is:

  1. Identify the target file drive item (from a folder listing)
  2. Read its @microsoft.graph.downloadUrl
  3. Perform an HTTP GET on that URL to retrieve the binary content
  • @microsoft.graph.downloadUrl
    • Use the @microsoft.graph.downloadUrl returned by Microsoft Graph for the target file.
  • The HTTP response body contains the file bytes (content-type depends on the file: XLSX/PDF/etc.).

Example screenshots (sensitive data obfuscated)

Section titled “Example screenshots (sensitive data obfuscated)”

Add the screenshot(s) below:

  • Screenshot — HTTP Request (input): shows an HTTP step configured with Method = GET and URL = MICROSOFT.GRAPH.DOWNLOADURL.

    Http response body contains file bytes

  • Screenshot — HTTP Request (output) (Screenshot 2026-03-25 at 15.48.18.png): shows a successful response (code = 200, status = OK) and the returned binary content-type.

    Http response body contains file bytes


When you need to produce an output file in SharePoint (for example, a result workbook based on a template), the simplest approach is often to copy an existing reference/template file into a destination folder, optionally renaming it.

This avoids dealing with raw upload/update semantics and keeps your flow based on drive item IDs.

Mindflow step: Microsoft Graph - Files → “Copy”

  • Drive id
    • The drive (document library) that contains the source item.
  • Drive item id
    • The source file drive item ID to copy.
  • Name
    • The destination filename.
  • Item reference.id
    • The destination folder drive item ID (where the copy should be created).
  • A response indicating the copy job has been accepted.
  • In most cases, you then list the destination folder to retrieve the new file’s drive item ID.

Example screenshots (sensitive data obfuscated)

Section titled “Example screenshots (sensitive data obfuscated)”

Add the screenshot(s) below:

  • Screenshot — Copy step (input): shows Drive id, Drive item id (source), Name, and Item reference.id (destination folder).

    Most cases you then list destination


Retrieve the copied/new file (list children + filter)

Section titled “Retrieve the copied/new file (list children + filter)”

After a copy/upload, you often need to retrieve the newly created file’s drive item ID.

Mindflow step: Microsoft Graph → Files → “List children of a driveItem”

  • Drive id
    • The drive where the destination folder lives.
  • Drive item id
    • The destination folder drive item ID (example: RESULTFOLDERID).
  • Filter (optional — enable via the Advanced button shown in the screenshot)
    • You can filter the results by file name using Microsoft Graph filter syntax.
    • Use the operator eq and wrap the expected name in single quotes.
    • The value must be the full file name, including its extension.
    • Example: name eq 'FILENAME'
  • The returned item entry for the file (capture its id, name, and optionally @microsoft.graph.downloadUrl).

Example screenshots (sensitive data obfuscated)

Section titled “Example screenshots (sensitive data obfuscated)”

Add the screenshot(s) below:

  • Screenshot — List children (input): shows the destination Drive item id and a Filter by name.

    Returned item entry file capture its