cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kuura
New Member

Get file metadata not working - How to input the library name?

Hello

 

I've been "banging my head to the wall" with this problem for a few days now. Tried all kind of recommended solutions, but none of them are working.

 

So, the flow is meant to be an approval flow, triggered by "For selected item". I want to build an approval flow that is triggered manually from a sharepoint document library. It's supposed to replace an old sign-off process done with pen and paper.


The troublesome part is the "Get file metadata", that isn't able to find the correct file ID. Apparently it needs a more specific URL with the library or folder name, I don't know.

 

Why I need the metadata, is because I need the eTag to be entered in.

 

Here are the first steps.

In "Get file metadata" selection menu, I cannot select the folder or library where my files are stored. Should I do something in the library settings in sharepoint side, to make it selectable?

 

Kuura_0-1613743514575.png

 

Here's the error message: The file "..." does not exist. This error message only has the site root URL and the file ID, without the library or folder name. Of course, as I couldn't select it in the first place.

 

Kuura_1-1613743607492.png

 

 

eTag from metadata is needed here, to find the exact file which the approval is for. The condition should check if the file is approved or not, but without the eTag it doesn't know which file to handle.

 

The steps after the condition are "Set content approval status" and "Update file properties." In plain terms, I want to update the approval status and then copy the approver name and comments back into the original document library.

 

Kuura_2-1613743821619.png

 

 

Any ideas how to identify the file, get the eTag and use it in later steps?

I would greatly appreciate the help.


Br,

 

Kuura Kumpulainen
Helsinki, Finland

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Kuura,

 

Can you try and use the get file properties action instead? Make sure you select a view which contains the eTag column/field btw.

 

getfileproperties_action.png

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @Kuura,

 

Can you try and use the get file properties action instead? Make sure you select a view which contains the eTag column/field btw.

 

getfileproperties_action.png

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus 

 

I tried with Get file properties. Now this step is ok in the test, but I can't pass eTag in step Set approval content. It's not available in dynamic content.

Kuura_0-1613753566736.png

You wrote: "Make sure you select a view which contains the eTag column/field btw."

 

If eTag is something that needs to be first created in the sharepoint view and library, I don't have a clue how to do it. Does it require a lot of programming or some premium features?

 

- Kuura

Expiscornovus
Super User
Super User

Hi @Kuura,

 

Apologies, I now see that you were talking about the ETag and Content Approval. I thought you were talking about random metadata fields. Below is an example how you can set this up, ignore my previous suggestion.

 

I believe with Content Approval you first have to submit it. After that you can set it to Approved or Rejected btw.

 

1. Add get file properties action. Use the ID field from the for a selected file trigger action

useidfromtriggeraction.png

 

2. Add a Get file metadata action. Use the Identifier field from the get file properties action

identifiedfield.png

 

3. Add a Set Content approval status action. Use the ItemId and ETag field from the get file metadata action.

etag_approvalcontent.png

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Kuura
New Member

Thank you so much!

After taking your advice and cleaning all the previous mess, I finally got it working.

Should've asked a week ago...

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,191)