
Announcements
Hello all,
I have a list in SharePoint for which each Item called CLIENTxxxx has a corresponding Excel Spreadsheet saved in a SharePoint library called the same as the item title, CLIENTXXXX.xslx (for example CLIENT1234 and CLIENT1234.xslx).
Is there a way to create a flow which would find the corresponding spreadsheet and attach it to the item via a sharing link? I figured I could go by the item title as it is the same as the spreadsheet name + .xslx.
The only step I am struggling with really is just making Power Automate locate that file.
The spreadsheets are always saved to the same folder in SharePoint. It is impossible to make Power Automate create that spreadsheet and then use that, as the spreadsheets are already exports of something else.
Thanks in advance for any help!
Here's a simple approach:
Get files (properties only) for the Library you're working with.
Create an Apply to each action and insert value into the Select an output line.
outputs('Get_files_(properties_only)')?['body/value']
Insert a Create a sharing link for a file or folder action.
Use the drop-downs in Site address and Library name to populate those lines with your information.
Insert ID into the Item Id line like this:
items('Apply_to_each')?['ID']
Populate the Link type and Link scope lines with whatever is appropriate in your organization.
Don't forget to look at the advanced options and use them if you need.
Tested this and it works.
Hope this helps,
Anne