I am trying to create a flow that updates a files target audience based off a piece of meta-data I assigned to the library. Specifically when the column 'audience' on a file is set to public it adds the public SharePoint group to the target audience and vice versa when the 'audience' is set to team only, it adds the team SharePoint group to the target audience.
Here are the problems I ran into so far:
1. When users add a file to the new library using the new experience it just uploads the file without having to assign any meta-data to it, that off the bat ruins the flow.
2. When I switch to the classic view to get the old upload form back it still triggers the flow before meta-data is assigned to it because its already uploaded to the server.
So when an item is created trigger does not work properly.
The second set of problems I ran into understanding the trigger needs to be correct first but I don't see how I can create an iteration.
Some pseudo code to explain:
If Audience = 'public' set Target Audience (public sharepoint group)
else Audience = 'team only' set Target Audience (private sharepoint group)
Has anyone tried something similiar? Basically if there is a way to update a column based off another column I am hoping it will work. I also thought about looking into using powershell to do this if flow is not capable yet.
Thanks for any discusison about this.