cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jpatrick327
Regular Visitor

SharePoint Update File Properties with Runtime Site & Library

I am presently using Flow to monitor a functional mailbox and file inbound documents to a myriad sites and document libraries based upon the sending e-mail address.  The translation of From to Site/Library is done using a cross reference in a SP List.

 

So, for clarification, a message comes into the mailbox from Sender A.  Flow checks SP list for "Sender A" to determine which Site and Doc Library the attached file should be sent to.  Flow then uses Copy to SP action to save the attachment to the appropriate Site/Library.

 

In addition to saving the file, I need to be able to updated a couple of meta-data elements of the document once it's saved to the library. However, it appears that the SharePoint Update File Properties action has to have the Site and Library at Design time.  It doesn't trust that I will provide the necessary values at run-time by passing them from a previous step.

 

Has anyone found a work-around for this?  I really don't want to have to go down the path of managing the Site/Library assignment using 30 different condition statements followed by 30 individual update statements!!!

3 REPLIES 3
v-yuazh-msft
Community Support
Community Support

Hi @jpatrick327,

 

You could save the Site Address and Library Name in the Compose action, and then you could insert the Compose value in the Site Address and List Name field of the "Update file properties" action, the screenshot of the flow should as below:

Capture.PNG

 

Best regards,

Alice

Perhaps I am mistaken, but I don't see how the use of a Compose step as shown is any different than using the outputs from the "Get Items" step.  In your example, the Site URL and Library Name are being provided at design time to the Compose step.  As a result, the "Update File Properties" step can still resolve those addresses at design time.  My problem is that these values are not known at design time, so I cannot assign them in this way to the Compose step. They are determined using a query at run-time.

 

If I've misunderstood the suggestion, please let me know.

 

Thanks!

MarkStokes
Skilled Sharer
Skilled Sharer

I can’t comment on the suggestion above, but it may work and you can put the output from your Get Items into the compose.

The ultimate power user in-friendly approach will be a “Send HTML to SharePoint” action and you build the REST query up manually.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,291)