Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Finding File ID?

(0) ShareShare
ReportReport
Posted on by

I created a flow that is triggered by a SharePoint file being modified and once modified, the flow sends an email to an admin account. Presently, the email is very rudimentary - there is only text that I have populated saying "the file has been updated", however, I'd like to provide more details in the body of the email. I'd like to include the following:

 

1) Who modified the file

2) What modifications were made to the file

 

I know that #1 should be pretty easy to accomplish using the SharePoint action, "Get File Properties". The challenge for me is trying to figure out what the "ID" of the file is. I've employed the trial and error method to hopefully guess the correct file ID, but after 3 days of failed attempt after failed attempt, I'm posting here. Is there a straightforward way for me to figure out the ID of the file that I'm trying to access?

 

MS Flow Help #1.JPG

Categories:
  • ch_flx Profile Picture
    ch_flx 151 on at
    Re: Finding File ID?

    retrieve the file path from your trigger "When a file is created" (without properties)

    then use that as argument for the action "Get file metadata using path"

    that will provide you the file ItemId (integer value)

  • courtneo Profile Picture
    courtneo on at
    Re: Finding File ID?

    Ah, you are facing the trouble that the trigger you are using ("When a file is created or modified" without "(properties only")) does not return the file id, it only returns the file GUID (as "File Identifier") .. Unfortunately that id cannot be used to fetch the file with a "get file properties" action - that action needs a number so the "file identifier" token will not even show as a possible input for that action..

     

    Apparently this issue is on the SharePoint team's Radar. In the meanwhile, I am afraid the other "(properties only)" trigger is the only one that currently supports what you are trying to do ..

  • Re: Finding File ID?

    Thanks for the response @courtneo

     

    Does it matter that I use the "When a file is created or modified" trigger without the "(properties only)"? The basic "When a file is modified or created" trigger is the one that I use, but there doesn't seem to be an ID output.

     

    I'm trying to track a specific file that's in its own folder. I just attempted to run my flow the way you suggested, and it doesn't allow me to drill down to the folder that contains the file I'm tracking.

  • courtneo Profile Picture
    courtneo on at
    Re: Finding File ID?

    Hi @Anonymous,

     

    File ID will be an output from the "when a file is modified or created" trigger - this should be the id you need to pass to your 'get file properties' step:

     

    temp.png

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard