I have a SharePoint List (List A) and one of the 'columns' contains a link (url) to a document in another list (List B).
I'm trying to construct a flow that does the following. The Flow is triggered when a value in List A is modified (e.g. a status is set to true). I'd like to access the contents of the file in List B, convert it to PDF and save the new file in List B.
There doesn't seem to be an obvious way to do a "Get" to obtain the ID of the file in List B (via it's url) from List A.
I've tried 'Get Attachment Contents' and the flow ran ok, but the output was blank, because (I presume) the Action wasn’t able to get a handle for the source file in List B.
Hi @Anonymous @
The Url of the document contain the name of the file.
First, we can get the name from the Url in List A, then using the ‘condition’ to get the document from List B.
I have made a test on my side, please take a try with the following workaround:
The Url which I created in List A is like this: file:///C:/Users/zhongys/Desktop/Daily words.docx
The compose action is to get the Name of the document.
The expression is : last(split(triggerBody()?['Url'],'/'))
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hI v-zhos-msft ,
Thanks for your reply, it is very much apprecaited. I spent some time experimenting with the teqnique you set out in your response but with no success. Unfortunately the url in the column in List A looks something like this...
I'm therefor not able to split off the file name and then compare it to each item in the list to find the item in List B.
What confuses me is that the url is a unique 'path' to the file so why can't that be used to get the contents of the file?
spent a bit more time on this... If I hard code the ID of the document the flow works perfectly. So, the missing bit is how to derive the ID of the document from the url
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!