top of page
  • Writer's pictureYash Agarwal

Working with Power Automate Flows in Solutions

In this #PowerShot we will take a look at resolving errors that might arise while importing solutions that include flows connecting to services (like outlook, office 365) developed externally.

Connections are an important factor on which flows are built on and it cannot be carried forward across tenants across services unless the connections are appropriately configured.


Let's Get Started!


Sample Flow


Below is a sample flow that uses an Outlook connection to perform the Send Email action. This flow is a part of a solution named 'test'. The flow is saved and the test solution is exported from tenant 'A' and then will be imported to tenant 'B'

Warning/error message


Once the solution is imported and the customization is published, the log file shows the below error for the flow:


Failed to activate component(s). Flow client error returned with status code "BadRequest" and details "{"error":{"code":"InvalidOpenApiFlow","message":"Flow save failed with code 'InvalidRequestContent' and message 'The request content is not valid and could not be deserialized: 'The 'id' property 'subscriptions/5c340b36-e0fa-450e-b6c2-cb7e0327fc56/providers/Microsoft.Web/locations/westus/runtimes/unitedstates-002/apis/office365/connections/' under 'properties.connectionReferences.shared_office365.connection' is not valid.'.'."}}".


Upon navigating to the newly imported solution and trying to turn on the flow, the same error notification is displayed as shown in the image below:

Resolution


In the imported solution, open the Flow in edit mode. You will see a warning sign on each action where the connection needs to be configured. Open each action and appropriately configure the connection for that particular action and save the flow.

Now return to the solutions and then try to turn on the flow. You should be able to see the success message as shown in the image below.

 

In this post we saw how connections can effect components of externally developed solutions and how we can resolve them. The same approach applies for canvas apps using connections to other services, flows extending to multiple other actions and etc.


I hope you found this interesting and it helped you. Thank you for reading!

Recent Posts

See All
bottom of page