I have a complex SharePoint document approval online flow that I am going to have to implement in many different sites.
Copying and pasting it to each site is unmanageable in terms of cost and maintenance. For a start, the SharePoint trigger "For a selected file" and the "Get file properties" action are very specific to ONE site and ONE library.
The right way to do this is with a solution within which you include:
- n very simple parent flows (just collect the credentials of the library and site from which the call is made).
- 1 child stream with the complete stream receiving the credentials from one of the parent streams.
I've seen something very similar to what I'm aiming for in this great DamoBird video.
But there you manage lists and not libraries. And it doesn't work with libraries.
To start with, I need to obtain and transfer from parent to child flow two very specific things: the URL of the site and the reference of the library (with a GUID like a list?).
For the first I have used many combinations of expressions. So, if the site address is something like "https://fcces.sharepoint.com/sites/HUB", I've tried:
first(split(split(body('Get_file_metadata')?['{Link}'],concat('/',body('Get_file_metadata')?['{FullPath}'])))))
Which output is:
https://fcces.sharepoint.com/sites/HUB/Shared%20Documents/20230907%20prueba%20def/Doc%20de%20prueba_validado.pdf
first(split(split(body('Get_file_metadata')?['{Link}'],concat('/',body('Get_file_metadata')?['{Path}']))))))
Which output is:
https://fcces.sharepoint.com/sites/HUB/Shared%20Documents/20230907%20prueba%20def/Doc%20de%20prueba_validado.pdf
first(split(split(body('Get_file_metadata')?['{Link}'],concat('/',encodeUriComponent(body('Get_file_metadata')?['{Path}']))))
Which output is:
https://fcces.sharepoint.com/sites/HUB/Shared%20Documents/20231018%20Pruebas/Documento%20prueba%201.pdfThe truth is that I haven't been able to do something as simple as getting the URL of the parent flow and passing it to the child.
And I haven't yet been able to try to get some unique identifier of the library the file is in to pass it to the child as well.
Anyone out there who is working with parent-child flows at the library and file level (and not in lists)?
Many thanks in advance

Report
All responses (
Answers (