As part of the process to simplify the logic of my Logic App, one of the steps was to start to convert existing Logic Apps into nested Logic App’s so that they can be called as a module which performs a specific purpose. In this case I am converting the Logic App which I wrote to query Nest into a nested Logic App. Below are the steps required:
First, we change the start of the existing Logic App, then we change the end of the existing Logic App, and then we call the new nested Logic App. Details on these steps are below:
Change the start of the existing Logic App:
Remove the existing start of the Logic App (scheduled execution in my example) and replace it with Manual – When an HTTP request is received”.
Change the end of the existing Logic App:
Then add Response as the end of the Logic App in this case passing back the body from the request which was done to the Nest API.
The updated version of the original Logic App is shown below:
Add the new nested Logic App:
Once it has saved it will generate the URL which will be specific to the nested Logic App. After this the new nested Logic App then appears as an option for Azure Logic Apps. In the example below I created a new Logic App which was now able to call an action to call the nested Logic App as shown below:
- This is shown from a high level in this TechNet article: https://social.technet.microsoft.com/wiki/contents/articles/34129.azure-logic-apps-call-nested-logic-apps-directly-from-logic-apps-designer.aspx
Summary: To convert an existing Logic App into a Nested logic app – just remove the scheduled execution and replace it with “Manual – When an HTP request is received”, add Response as the end of the Logic App and save the updated Logic App.