Dear Fellow Users.
I am fairly new to using PowerAutomate. Until now I only used the basic actions for some simple tasks. But what I want to make now is unknown territory for me.
I need your help whit the following concept. (see photo.) The company I work for uses SharePoint as work environment and as a platform to provide files to external involved companies. The company I work for mainly works on a project basis. A Standardized SharePoint environment is therefore created for each project.
Most files may not be shared or are not interesting to the external companies. that is why I want to create a sub-folder for each folder (folder 1 0--> 1.1, 2--> 2.1, 3-->3.1 ect) that contains all files that may be shared. this sub-folder must be synchronized with folder with the same name in another library on the same SharePoint site “External sharing platform”.
For this I want to use a "recurrence trigger" every x hours. Here comes the hard part, the flow must check the differences in both libraries in specific folders. If there are differences, a new file must be created or deleted on the “external sharing platform”
Is this even possible?
Hello @S_J_G
The documents being shared in the External sharing platform, are they allowed to be edited by the people there or can they only read/view the documents?
You should not have your recurrent flow do any checking, just make a Get files action with a Filter Query field condition that will include only files having been modified within the last couple of hours. That will minimize the amount of files you need to synchronize every time.
If you can, add a property to your folders or create a folder content type, so you easily can identify if it is shareable or not. Then you can include that information in the Filter Query field and minimize the workload even further.
Let's hear back from you on the above and about how far you have gotten already 🙂
Kind regards, John
The external users are only allowed to read the documents.
Great Idea! I think I'm going to add an extra column to SharePoint, (Shared File Yes / No).
add a extra property to the sub folder> when you add file to subfolder, automatically "Share File" Column = Yes
or something like that. Create flow using the action "when a file is created or modified ". But this idea doesn't work when you delete a file, does it? this is not part of creating / modified.
(i cant use "when file is deleted" action, only admins can orsomething)
But, I wanted to make a recurrent flow instead of a automated flow. I read somewhere ; if you have Sharepoint folders added to your local desktop, automated flows wil not be triggered if you upload files locally. is this True?
Hello @S_J_G
About libraries synchronized to your desktop - I observed through tests, that a file dragged/dropped into a library that is synchronized to your desktop (using OneDrive) will not trigger a file creation event. At the same time, if I copied a file into the same library, then it will trigger a file creation event.
About keeping your external sharing platform up to date, there are some suggestions:
The above relies on that you can add a column to the external sharing library that will hold the ID of the document in the source library, so that you can easily identify which document to update/delete.
Kind regards, John
Progress update (below): I tried your suggestion. I tried to use the ID column field but it didnt work out for me. When i moved/copyed or created a sample file, the ID just automatically changed, so i could not compare them anymore. Also i can't monitor deleted files because i am not an admin.
I managed to make a flow that moves files via the file name. The filename will be unieke enough for my use case (i think).
the only challanges i face now are;
- how do i get the file in the right folder. Both external and internal folders have the same name.
- how do i remove files thet where deleted in the internal workspace. whitout "when file is deleted" action.
1
2
Hello @S_J_G
About the issue with not being able to use the When a file is deleted trigger:
About synchronizing files to the External sharing platform:
Example flow (not real, just quickly put together as an example)
Kind regards, John
Hello @S_J_G
In that Append to string variable action, what is the expression that you use?
It states that you are using the REPLACE function and that the value you provided to it as the first parameter is not a string.
Kind regards, John
Hello @S_J_G
In the REPLACE function, the 1st parameter has to be the folder path (dynamic property) of the file from the internal workspace! That means that it cannot come from the triggerOutputs!
Looking at your flow, the action "Get files (properties only) - Internal workspace" is where the 1st parameter should come from! 🙂
Kind regards, John
Hello @JohnAageAnderse
Thank you for your fast replays!
to be honest I'm just copying now, I understand what it should do. But I have a lot of trouble with how to properly use expressoins . I still get the same error after using the dynamic property 'body'.
replace(outputs('(I)_Get_files_(properties_only)_-_Internal_workspace')?['/teams/Zuidplaspolderfase5/06 Werkdocumenten}'],'/teams/Zuidplaspolderfase5/Actuele stukken omgeving','')
So close, but so far away..., could you give some inside how to properly use the expression in this case?
I assume that I am so far off that it is no longer worth responding haha😅. but thanks anyways for your effort so far.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
65 | |
51 | |
30 | |
29 | |
24 |