Hi all, I am trying to achieve something in Flow that was so simple in SharePoint Designer.
I have created a workflow on Library1, and I need it to check Library2 for any file with the Name of the document in Library1, and get that file's properties. Specifically I want the file URL.
In SP Designer I would just create a workflow variable from Library2 using field "Name" and I could choose whatever file property I wanted.
But with Flow the Get File Properties seems to throw tons of errors and basically crashes the workflow. It also doesn't allow me to select just one property, but instead proceeds to 'get' all the properties.
My desired result is:
When a file is created in Library1, check if a file with the same name exists in Library2. If it exists, get file in Library2's URL and send it in an email.
Can anyone show me an easier way to achieve what I am trying to do?
Great solution to a similar problem I was having, so thanks for that!
I must ask, is there a good reason why we must jump through 3 hoops to gather information that really should just be provided in the first place? Why is it that we have to use three different steps to retrieve the link??
Sylvie,
Without knowing for sure, I would guess that it is taking a long time because of the large number of files the 'Get files (properties only) query in the Flow. Expanding the advanced options in there it suggests filter query options, limit the number of columns returned by a view and the top number of rows to return from the query. Those are quite probably for the very reason you're suggesting I'd imagine.
Hey Kris,
I've noticed in some cases the Apply to Each function is taking a LONG time to complete. For example...it's still running from 3 days ago. Is that simply because it's a heavy command? Will this type of performance get worse as the number of files increases?
Thanks,
Sylvie
Fantastic, thank you so much for this extremely clear step-by-step guide Kris.
I've created it and indeed it is sending me the links to documents.
I'm going to see if I can adapt this to:
1. Run on a button
2. send an approval email
3. on approval, add the link into a column in Library1
3. add a date in another column in Library1.
Thanks again, this was SO helpful!
Sylvie
Hi @Anonymous,
I have made a test on my side and please take a try with the following workaround:
Add a Condition, click "Edit in advanced mode", type the following formula:
@equals(body('Get_file_metadata_2')?['DisplayName'], body('Get_file_metadata')?['DisplayName'])
Within "If/yes" branch of Condition, add a "Send an email" action, Body field set to Link to item dynamic content of "Get files (properties only)" action.
Image reference:
The flow works successfully as below:
Best regards,
Kris
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492