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 / Get itemId of an attac...
Power Automate
Answered

Get itemId of an attached item in sharepoint list, save it in an excel and then update an item in a list in sharepoint

(0) ShareShare
ReportReport
Posted on by 265

Hello everybody ! .
I am attaching different files in different items in a sharepoint list.

 

Pregunta 3.png

 

In another step, I update under certain conditions the details of that document (e.g. name). For that, I save in an excel the file folder, its name and need to save its ItemID. I know that the Item ID must be obtained through "obtain metadata of a file by path".

 

Pregunta 1.png
My problem is that I can't save the ItemID so that it can be used in "update item in sharepoint".
Pregunta 2.png

 

 

I don't know what I'm doing wrong or how I can resolve this. Can you please help me? Thanks

Get itemId of an attached item in sharepoint list , save it in an excel and then update an item in a list in sharepoint

Categories:
  • PrasadAthalye Profile Picture
    on at

    @elaaadani - Can you please clarify following ...

     

    1. Do you have a SharePoint List OR A Library? Looks to me like a SharePoint List.
    2. What is the trigger of this flow? Is it when an Item is Created?
    3. If # 2 is correct, then you can get Item ID from the trigger properties itself...
  • elaaadani Profile Picture
    265 on at

    @PrasadAthalye 

    Thank you very much for replying !!
    My trigger is when an excel file is created in OneDrive.
    With this I perform a series of actions.
    I create elements but inside folders by HTTP request. In that element that I create inside the folder, then I attach a document (what I show in the image)

  • PrasadAthalye Profile Picture
    on at

    Ok, thank you. So are you looking for ItemId related to Excel that you are creating in one drive?

  • elaaadani Profile Picture
    265 on at

    @PrasadAthalye ItemID of items in a list in sharepoint.
    I already have the Id of these items.
    My problem now is that I save that ID in excel and when I invoke it in an update element
    in sharepoint, it tells me that it must be of type Integer.

    This is what I do so far. Aux5 is of type integer and in excel the ID column is of type numeric.

    Pregunta2.png

    Pregunta 3.pngPregunta1.png

     

    How can I pass that ID saved in excel to Integer so that update element can understand it?

  • Verified answer
    PrasadAthalye Profile Picture
    on at

    Thank you for the details. Can you convert the excel column using Int and see if that works? I had a similar requirement to convert the excel column to float and since it's an Array of rows from excel, I am setting it within the loop. Please refer below...

     

    Here is my expression --> 

    int(items('Apply_to_each')?['Difference']) 
     
    so may be in your case, inside loop you can use expression if your excel column name is ID --> 
    int(items('Apply_to_each')?['ID'])

     

    PrasadAthalye_0-1611850913146.png

     

  • elaaadani Profile Picture
    265 on at

    @PrasadAthalye thank you. I have a question. How do I do that Int for the column "ID" ? When using expressions, I only get "value" or "body".


  • Verified answer
    PrasadAthalye Profile Picture
    on at

    You will have to manually type it in the expression... also you will have to run a apply to each.... You can add apply to each loop on the value array and then use an expression that I gave above... Let me know if it works...

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard