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 create and ...
Power Automate
Unanswered

Sharepoint create and update file properties

(0) ShareShare
ReportReport
Posted on by 25

I get several emails everyday with 1 to 6 pdf attachments all in the same format, and the body of the email contains 1 to 6 strings corresponding to each attachment.    

 

I need to create a sharepoint file for each attachment in a shared library and update the file's properties by splitting each string to get the info for each column.  I can split each string by turning it into an array,  but im having the hardest time creating the files and having the strings go into the columns/properties for each one.  

 

Here is a screenshot of what I've been working on, some help would be very appreciated.  

 

55oC0pyySymHB0HcDXepcA_thumb_663d.jpg

Let me know if you require any additional information! 

Categories:
I have the same question (0)
  • Gristy Profile Picture
    2,429 on at

    With what you have so far - what is successful and what fails?

  • AKRogers Profile Picture
    354 on at

    Hi @miketondu,

     

    As the poster before me mentioned, some extra information on what is failing would be very helpful!  However, right off the bat I can suggest a couple of things to make this easier on you:

     

    • Rename your actions, particularly all those Compose actions.  You want something like "Compose: Requester" or "Compose: Department."  That way you'll be able to see at a glance in the Dynamic Content window which of the compose actions "Outcomes" is correct for each field you want to update.  
    • Use the correct ID in the Update Action.  The "Create file" action will generate an ID, and that's the one you want to use in your Update File Properties action.

     

    Take care!

    Ashley

     

    If this response provided an answer to your question please mark it as a solution so that others can find it.

    If you found this helpful, consider giving it a thumbs up!

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

     

    Hi @miketondu ,

     

    Would you like to show us the details of the Flow configuration to illustrate your needs and tell us what is the problem you are currently experiencing?

     

    Best Regards,

  • miketondu Profile Picture
    25 on at

    I get the 1-6  strings into an array and then proceed to split each one in the required manner to get the info for each column in the sharepoint file (This is the inner loop).   The files get created in the sharepoint with the attachment name, however I can't update the files with the appropriate string.   

    So in the numerous set ups I've tried, I end up either with

    1). a flow error

    2). 6 files all with the same properties for their respective columns (instead of having their corresponding ones)

    3). Just the files created without any of their properties updated.   

     

     

  • AKRogers Profile Picture
    354 on at

    Do you mean for each of the attachments to have the same metadata?  Because if I'm looking at this correctly, for each attachment you're setting the same information in the inner loop. 

    I think what you want to do is have ONE compose action in the inner loop that looks at the [x] place in the array.  So, the first iteration would look at array[0], then array[1], and so on....

     

    You may need to split your array differently, so a screenshot of the arrays from one of your Flow runs would help to straighten things out!

     

    Thanks,

    Ashley

     

    If you found this helpful, consider giving it a thumbs up!

  • miketondu Profile Picture
    25 on at

    Thank you very much for your reply.   

    In this particular set up it's definitely got something to do with how the for loop is accessinng the array. However, in other setups I;ve tried I ended up creating the six files from the attachments six different times for each part of the array.  

    Here is a screenshot of the flow run for an Email that contains 3 attachments

     

    Screen Shot 2019-10-24 at 1.16.32 PM.png
    Screen Shot 2019-10-24 at 10.53.14 AM.png

    Screen Shot 2019-10-24 at 11.17.11 AM.png

    Screen Shot 2019-10-24 at 10.51.14 AM.png

  • AKRogers Profile Picture
    354 on at

    Thanks, that was helpful to see! I see what you are trying to do.  What happened with this particular run, did the wrong item update or not update...?  I'm asking because in looking at the ItemId in the Outputs of the Create file action I see that value is 424.  Looking at the ID in the Outputs of the Update File Properties 2 action that value is 174.  

     

    When you add in the dynamic ID in the Update File Properties action, are you using the correct ID that comes specifically from the Create File action?  You can hover over the fields to see exactly which actions/fields you are using.

     

    Ashley

     

     

  • miketondu Profile Picture
    25 on at

    I re ran the flow and am getting the same ID for both outputs:   174     

    I end up getting the files created but without any of the properties updated.   I think the array I has an empty space as its last element and that might be doing soemething to it.  I haven't been able to get rid of it using the filter array option though.  

    I think the main issue has something to do with how the loops are setup.

  • miketondu Profile Picture
    25 on at

    Hey Ashley,  

     

    So the main issue I have is I can't assign the right part of the array to each "create file"  and "update file action" action.

    Do you have any tips on how I could access the array[x] elements in each iteration?    Maybe I shouldn't be a "for each" loop to split up the array? 

    Thanks for your help 

     

     

     

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 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard