Hello Everyone,
I bit confused how to create a flow which can copy from a main site collection → library → folder → file.vsdx to 100 other sites under a specific location.
ex: when a specific file under domaintest.sharepoint.com/sites/sitecollection → folder →filevsdx is modified then flow should trigger and copy that modified file across all the other site collections that started with domaintest.sharepoint.com/sites/ON-
so any site that starts as "ON-" after the /sites then it should copy file under a library.
I am not sure about the steps exactly. can someone provide an insight on this?
steps:
1. when a file is created or modified in a folder(SharePoint).
2. copy file (SharePoint)
Solved! Go to Solution.
Hey @Anonymous ,
Yes it works 🙂
I have configured the SharePoint list as follows:
The calculated column example:
Example List Item:
The Flow configuration:
Run history:
HTH
Jay
-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up
Hi @Anonymous
The primary challenge is obtaining a list of the possible site collections... there isn't a standard power automate action which retrieves all site collections, you could add a HTTP request to query to the graph... and then filter the returned JSON array as needed.
Or simpler... just create a list in SharePoint which holds all the site you wish to copy the file to, you could optionally also store the folder path in the list as well the site url, quick example below:
HTH
Jay
-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up
thanks @Jay-Encodian for quick reply. I have a list all of the site collection URL under a column called "URL". I can use that as my site collection and can copy the file right?
AT the destination I am using a library. so do I need to mention destination folder name as "library name" ?
Hey @Anonymous
Yeah, that’s how I configured the example Flow... I was suggesting you could also add a ‘Folder Path’ column to the list which would allow you to cater for different file path locations across the sites.
@Jay-Encodian thank for your suggestion. The list that I have will be update on a regular basis and we get new sites created every now and then. So I have to set the column as calculated column so that whenever a URL has been added to the list then this calculated column should path library called "testing".
ex: URl column = domin.sharepoint.com/sites/on-10101 then calculated column should auto populatwith URL along with "/testing " library.
so do I need to add calculated formula as =column +'/testing' ?
Hey @Anonymous
You should a list containing two text columns... URL and ‘Folder Path’
Just add a new entry for every site and set the values, there shouldn’t be any need to calc values, just ensure the full URL and Folder Paths are added for each list item
@Jay-Encodian well the issue is that end user will add new items along with and URL of a site. They won't add complete path of the library.. so whenever they add new entry in the list, based up on the URL entered it should auto populate new column with complete library path.
If it is one time setup, then yes I agree having two column with the details already populated will work without any issue.
Due to this I was thinking to add calculated column so that it can auto populate complete URL based up every new entry
Hey @Anonymous
I understand, but if your auto setting to a calculated value.... then I don’t think you need the column? If it will always be a consistent path you can hard code the folder path in the flow and negate adding the column in your SharePoint list. You can always add later if you need to
hi @Jay-Encodian , thanks for the idea. Yes, it is always the same so we can hard-code it in the flow. testing it now
hi @Jay-Encodian , no luck. The column that I am using is an calculated column. so it is not picking the URL at all. the reason why it is calculated column is because when my user enter a asset number, calculated column will be auto-populated with and URL constructing and patching with that asset number. this entire URL will be used to create a site collection.
can flow pick the URL from a calculated column?
@Anonymous
Much simpler 🙂
just type in the Folder path in the ‘Destination Folder’ property of the ‘Copy file’ action
Hey @Anonymous
It’s coming up to 11pm here, I’ll check in the morning ref calculated column
Hey @Anonymous ,
Yes it works 🙂
I have configured the SharePoint list as follows:
The calculated column example:
Example List Item:
The Flow configuration:
Run history:
HTH
Jay
-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up
@Jay-Encodian, thanks you for testing it. I was able to fix it yesterday night by making small change. Instead of using calculated column with the URL, I have hardcoded URL until "ON-" and then used another column which is the site Name. Based up on that it was able to find out the location and was able to copy it.
ex: Asset Number: 101010 (this a list column), then SharePoint site we are creating is called domain.sharepoint.com/sites/ON-101010.
So in the destination URL I have used like this "domain.sharepoint.com/sites/ON-column".
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
23 | |
13 | |
11 | |
10 | |
8 |
User | Count |
---|---|
32 | |
25 | |
25 | |
17 | |
16 |