cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
simonjhudson
Level: Powered On

Add an existing Flow to a SharePoint library

If a Flow already exists, it's easy enough to add it to an existing SharePoint library. However I can't find any way to add a Flow I have previously created to an existing library.

 

Can anyone help me out here?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Add an existing Flow to a SharePoint library

Hi @simonjhudson,

 

Do you want to find a specific flow based on a condition and then save it to an existing SharePoint library if it exists?

 

I have made a test on my side and find the specific flow through flow display name, please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "List My Flows" action of Flow management connector, specify environment.
  • Add a "Filter array" action, From set to value output of "List My Flows" action, within Condition box, left input box set to Flow Display Name dynamic content of "List My Flows" action, right input box set to 20180301_case9 (on your side, set the name of your flow that you want to find), within middle drop down, choose is equal to.
  • Add a Condition, click "Edit in advanced mode", type the following formula:

 

@not(empty(body('Filter_array')))

 

  • Within "If/yes" branch of Condition, add a "Apply to each" action, input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Get Flow" action, specify environment and Flow field set to Flow Name dynamic content of "Filter array" action. Then add a "Create file" action, specify Site Address and Folder Path. File Name field set to following formula:
Flow Display Name dynamic content of "Get Flow" action.json

File Content field set to Flow Definition dynamic content of "Get Flow" action.

 

Image reference:10.JPG

 

11.JPG

 

The flow works successfully as below:12.JPG

 

The file opens well as below:13.JPG

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Community Support Team
Community Support Team

Re: Add an existing Flow to a SharePoint library

Hi @simonjhudson,

 

Do you want to find a specific flow based on a condition and then save it to an existing SharePoint library if it exists?

 

I have made a test on my side and find the specific flow through flow display name, please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "List My Flows" action of Flow management connector, specify environment.
  • Add a "Filter array" action, From set to value output of "List My Flows" action, within Condition box, left input box set to Flow Display Name dynamic content of "List My Flows" action, right input box set to 20180301_case9 (on your side, set the name of your flow that you want to find), within middle drop down, choose is equal to.
  • Add a Condition, click "Edit in advanced mode", type the following formula:

 

@not(empty(body('Filter_array')))

 

  • Within "If/yes" branch of Condition, add a "Apply to each" action, input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Get Flow" action, specify environment and Flow field set to Flow Name dynamic content of "Filter array" action. Then add a "Create file" action, specify Site Address and Folder Path. File Name field set to following formula:
Flow Display Name dynamic content of "Get Flow" action.json

File Content field set to Flow Definition dynamic content of "Get Flow" action.

 

Image reference:10.JPG

 

11.JPG

 

The flow works successfully as below:12.JPG

 

The file opens well as below:13.JPG

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

simonjhudson
Level: Powered On

Re: Add an existing Flow to a SharePoint library

Actually, my need was simpler. I just couldn't find out how to re-use an existing Flow.

It turns out it's simple. Just make a copy of the Flow, edit it and then choose the new library location and name to attach it to tht library (easy, but not documented anywhere!)

 

However your suggestion is really intersting, as it migh tmake it easy to provision Flows to existing sites automatically. I'll try it out and report back.

Many thanks for the response Kris!

buildbod
Level: Powered On

Re: Add an existing Flow to a SharePoint library

Just picking up on a comment

 

"

It turns out it's simple. Just make a copy of the Flow, edit it and then choose the new library location and name to attach it to tht library (easy, but not documented anywhere!)

"

 

Is it now documented and if so where?

Manolis
Level: Powered On

Re: Add an existing Flow to a SharePoint library

Ca you provide more details on the solution, please? Copied it? How?

simonjhudson
Level: Powered On

Re: Add an existing Flow to a SharePoint library

It really is as simple as creating a copy of a flow, then edit the step in the flow that cake the SharePoint library or list to connect to a different library or list.
Manolis
Level: Powered On

Re: Add an existing Flow to a SharePoint library

Thank you for the answer and I have done that. Perhaps I misundersttod the idea. You are not adding the Flow to the library but simply referencing the library in the step (i.e. Get Files) of the Flow. Is this what you were implying?

simonjhudson
Level: Powered On

Re: Add an existing Flow to a SharePoint library

Exactly.
You tell the flow to use the library, not the other way around. It was driving me nuts until I spotted how to do that!
Manolis
Level: Powered On

Re: Add an existing Flow to a SharePoint library

I felt the same way. Now I know...

Thank you.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 331 members 5,358 guests
Please welcome our newest community members: