web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint File Action...
Power Automate
Unanswered

Sharepoint File Action should make FileID available!

(0) ShareShare
ReportReport
Posted on by 10

How can i obtain the FileID for a newly created Sharepoint file in a flow which copies a file from onedrive for business.

i want to use the id in the next step to change document properties

there is only the FileSize available as dynamic content in the next action!!!

Categories:
I have the same question (0)
  • Tpuehri Profile Picture
    10 on at

    I need the sharepoint file id in the next action after creating it by copying from onedrive.

     

    I want to update the file properties after the file is copied from a onedrive folder.

     

    Can anybody help?

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @Tpuehri,

     

    If you mean to update the File property, then I don't think File identifier would be helpful here.

    It would need to use the Item Id to update the corresponding item (file properties) fields.

    And this is not a property provided by the create file Action.

    We need first take use of the SharePoint ->Get Files(properties only ), then add a filter to find the proper item and then update the corresponding field:

    See screenshots:

    68.PNG

     

    The formula used under the Condition is the following:

    @equals(
     items('Apply_to_each')?['{Name}'], 
     first(
     split(body('Create_file')?['DisplayName'],'.')
     )
     )

    This is because the Name or the DisplayName content from the Create File content would contain the file extension, while the Name content from the Get Files(property only) don't contain the file extension, so to make the condition work, we need to split the DisplayName field.

    Please check and see if this would work for you.

    Running results from my side:

    69.PNG

    Regards,

    Michael

  • Tpuehri Profile Picture
    10 on at

    Hello,

     

    thank you!

    I will test it.

     

    Is there a documentation available on the commands you are using. Like @equals, split, body etc.

    I am trying to figure out how to use them.

    i did not get the meaning of body('Create File') yet. 

     

     

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Yes,

    See the documentation here:

    WorkFlow Definition Language

     

    Body('Create File' ) represents the Response Body of the SharePoint Create File Action,

    And the Item('Apply_to_each') show the each item record data.

     

    Post back if you need any further help on this.

    Regards,

    Michael

  • Tpuehri Profile Picture
    10 on at

    Hello,  

    tested your suggested action but it runs into an error.

    I think it is related to the input data for metadata columns.

     

    05-08-_2017_16-36-39.png05-08-_2017_16-41-47.png

  • Tpuehri Profile Picture
    10 on at

    Additionally i am trying to delete the file from onedrive for business after copying it to sharepoint.

    unfortunately the file is not deleted. i am using the fileid of onedrive05-08-_2017_19-10-30.png

  • Tpuehri Profile Picture
    10 on at

    i am not succeeding to update my metdata field which has a choice list (menu).

    I am able to update text fields but no other field types.

     

    Do i need a special function for updating?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard