cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
westerdaled
Helper V
Helper V

Importing an existing Power App connected flow into a solution: will I need to recreate it?

 

I have spent the morning importing the related Power Apps and Flows into the newly provisioned Development environment.

 

Next , I have been adding each App  to a new Sandbox solution.  So re-adding SharePoint datasource connections to generate new environment variables.

 

Going well, until I am come to the Power App Connected flow in one of the forms which I understand  comes with a health warning  aka known limitation.  Am I honestly expected to recreate this flow within the solution . If so,  will I  be able to use the clipboard?  Alternatively, is there a work around, such as copying the existing flow source into  newly created flow in the solution?

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
joe_hannes_col
Continued Contributor
Continued Contributor

Hello @westerdaled,

 

It would probably indeed be easiest to replace the source code of the flow in your solution file.

The solution file will contain folders similar to this:

joe_hannes_col_0-1627645121676.png

In the "workflows" folder, you will find a JSON file for every flow. You can replace the JSON with the JSON content of your original flow.

You may have to replace the connection references though.

 

Or you could export the flow from your original environment, re-import it in the new environment. You should be able to copy-paste the steps now, which I think is not possible across environments.

If you could re-arrange at least some of your steps into scopes, this would make the copy-pasting exercise much less time consuming. You can also copy-paste code: https://docs.microsoft.com/en-us/business-applications-release-notes/april19/microsoft-flow/copy-pas...

 

View solution in original post

8 REPLIES 8
joe_hannes_col
Continued Contributor
Continued Contributor

Hello @westerdaled,

 

It would probably indeed be easiest to replace the source code of the flow in your solution file.

The solution file will contain folders similar to this:

joe_hannes_col_0-1627645121676.png

In the "workflows" folder, you will find a JSON file for every flow. You can replace the JSON with the JSON content of your original flow.

You may have to replace the connection references though.

 

Or you could export the flow from your original environment, re-import it in the new environment. You should be able to copy-paste the steps now, which I think is not possible across environments.

If you could re-arrange at least some of your steps into scopes, this would make the copy-pasting exercise much less time consuming. You can also copy-paste code: https://docs.microsoft.com/en-us/business-applications-release-notes/april19/microsoft-flow/copy-pas...

 

View solution in original post

@joe_hannes_col 

 

Thanks very much for your prompt response.  I have imported the flow in the new environment but not the solution.  I guess I can try to recreate it using your 2nd option and if it gets difficult, go to export the solution and then attempt your 1st option.  I will try out the copy code snippets via the clipboard too. 

 

Update

I had already refactored the flow using scopes so was fairly quick to copy these to the clipboard and add to the recreated flow in the solution - bit surreal having the two copies of the same flow in the same environment🙄 .

  However , I am now forced to update the connection references and env vars in all the actions.  Not all the env have been created so the flow doesn't save . Will make another attempt when all auto created env vars are available. 

 

 

I have now add my my  existing PowerApp->flow existing to the Development environment.  Next, I want  recreate this flow within the desired solution. 

  1. Added previous scopes via the clipboard as suggested by @joe_hannes_col 
  2. Change each SharePoint Action to use
    1. A connection reference
    2. Change the Site to an auto created environment variable
    3. Change the List to another auto created environment variable 

 

All good good until I attempt to save the flow 

Rexcreate Power Automate in a solution.PNG

 

I have no idea why this is showing this as there is nobody else working on the flow, both inside and outside the solution.  So far every option I choose seems to loose the recent changes to the flow.

joe_hannes_col
Continued Contributor
Continued Contributor

Hello @westerdaled,

 

I believe this error is unrelated to your original problem.

I have started receiving this error yesterday, and I saw it pop up on Reddit two days ago. I think this might be an issue on the platform side.

Using the 3rd option (Overwrite other people's changes) worked for me, and my changes were preserved.

@joe_hannes_col 

 

I went with your suggestion and the flow attempts to save

 

Missing connection refererence  error.PNG

 

This is a bit odd as all the actions I have recheck the flow all the relevant actions have  ether the SharePoint  or Outlook 365 valid connection references ( my email address) is set. Do Do I need to delete the same flow that is outside the solution but still resides in the environment?

 

 

 

Hello @westerdaled,

 

The existing flow should not impact the saving of your new flow. The problem is probably related to the connections you are using, even if they are showing up correctly.

From the ID in the error message you shared, can you see which connector this refers to, e.g. from the JSON of an exported flow? If yes, you could try to create a new connection for this particular connector, set all the actions in your flow to this new connection, and save again.

Otherwise my next step would be to re-create all connections used in the flow.

@joe_hannes_col 

 

In the end I recreated the flow using an incremental approach. I quickly worked out that my issue is caused to by the Outlook actions only , so these needed a new connection reference created.  Just re-adding these now.

Thanks for your you words advice .

Hello @westerdaled,

 

Great to hear you can move forward. Thanks for sharing.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,610)