Flow: Managing Flow owners
The Problem
A situation where you needed to add a user as co-owner for all of the flows under another user account, where there are lots of flows created.
The Solution
This post,will quickly show how to build this simple and useful flow.
Step 1. Recurrence Trigger
In order to easily trigger the Flow manually, create it with the recurrence trigger. The frequency can be anything, but you can set this to at least one month to avoid the hassle.
Step 2. Get User Profile (V2) Action
Next action: In order to get the user Id and add it as Flow owner easily, use the Get User Profile action, which accepts e-mail address as parameters. And include here the e-mail address of the user that should get co-owner access in the flows.
After this, use the List My Flows action for the desired environment, so you'll retrieve a list of all your flows. Then add a Modify Flow Owners Action as next action using Flow Name* *from previous List My Flows action as the Flow parameter for the selected flow in the Modify Flow Owners action. As soon as this value is selected, Flow identifies it is an array of items from the previous action and creates a loop to iterate through all items.
Step 3. List My Flows Action
Then to wrap up the flow, use the User Id from the Get user profile action to add the user as Owner. As we are going to add a user and not a group, select User as the user type.
Save the flow, and it is ready to be executed.
Step 4. Run The Flow
Find the flow under My Flows menu and click the Run button below.
Wait for it to be executed, and then log into the new account to see the magic.
Boom!! All flows successfully shared.