Child Cloud Flows and Data Passing
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 10 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Lesson: Mastering Child Cloud Flows and Data Passing
Introduction: Why Modular Automation Matters
In the world of cloud automation, it is common to start with a single, linear flow that handles a specific business process. Perhaps you have a flow that triggers when a new item is added to a SharePoint list, performs a few lookups, sends an email, and updates a status field. This works perfectly when the logic is simple and contained. However, as business requirements evolve, these "monolithic" flows become increasingly difficult to manage. They become long, complex chains of actions that are prone to errors and nearly impossible to debug or reuse across different parts of your organization.
This is where the concept of Child Cloud Flows—also known as modular or sub-flows—becomes essential. A Child Cloud Flow is a standalone automation that is designed to be called by another flow (the "Parent Flow"). By breaking down large, complex processes into smaller, reusable components, you gain the ability to maintain your code more effectively, share logic between different projects, and create more readable automation structures.
Understanding how to pass data between these flows is the cornerstone of building scalable automation systems. Whether you are passing a simple customer ID or a complex JSON object containing dozens of variables, knowing the mechanics of inputs and outputs allows you to build a system where the parent flow acts as an orchestrator, and the child flows act as specialized workers. This lesson will guide you through the architecture, implementation, and best practices of using Child Cloud Flows to build more maintainable and professional automation systems.
Not read yet
The Architecture of Parent-Child Flows
To understand why we move away from monolithic flows, we must look at the structural difference between a single, large flow and a modular system. A monolithic flow is a single vertical chain. If you need to perform the same "Get User Manager" logic in five different flows, you are forced to copy and paste those actions into every single one. If the logic for retrieving that manager changes—perhaps you move from an older API to a newer one—you have to manually update all five flows.
A modular architecture, conversely, treats the "Get User Manager" logic as a single Child Flow. When a parent flow needs that information, it calls the child flow, provides the necessary input, and receives the output. This creates a "single source of truth" for your logic. If the business process changes, you update the Child Flow once, and every parent flow using that component is automatically updated.
Key Components of the Interaction
- The Parent Flow: This is the flow that initiates the process. It is responsible for the trigger (e.g., a button press, a file arrival, or a scheduled time) and manages the overall flow of data.
- The Child Flow: This is a specialized, headless flow. It does not have a traditional trigger like a SharePoint or Outlook event. Instead, it uses a specific "Power Apps or Flow" trigger that allows it to wait for a request from a parent.
- The Interface (Data Passing): This is the contract between the two. You define the inputs the child expects and the outputs it will return to the parent.
Callout: Monolithic vs. Modular Automation Monolithic flows are like writing an entire software application in a single function; it is easy to start but impossible to maintain at scale. Modular flows are like using functions in programming; you define a unit of work once and invoke it wherever needed. This modularity reduces technical debt and allows teams to work on different parts of an automation project simultaneously without stepping on each other's toes.
Not read yet
Setting Up Your First Child Cloud Flow
Creating a child flow is slightly different from creating a standard flow because it requires a specific trigger configuration. You cannot simply turn any flow into a child flow; it must be designed as one from the start.
Step-by-Step: Creating the Child Flow
- Create a new Solution: Child flows must reside within a Dataverse Solution. If you are working outside of solutions, you will not be able to create a child flow. Create a new solution in your environment to house your related flows.
- Create a new Cloud Flow: Inside your solution, click "New" and select "Cloud Flow." Choose "Instant cloud flow."
- Select the Trigger: Search for and select the trigger named "Power Apps or Flow." This trigger is the gatekeeper for your child flow.
- Define Inputs: Click "Add an input." Choose the data type that best fits your needs (Text, Yes/No, Number, File, or Email). Give the input a meaningful name, such as
UserEmailAddress. This name is what the parent flow will see. - Build the Logic: Add your actions (e.g., "Get user profile (V2)"). Use the dynamic content from the trigger input to perform your task.
- Add the Response Action: To return data to the parent, add a new step and search for "Respond to a PowerApp or flow." Add the outputs you want to send back, such as
ManagerEmailorDepartmentName. - Save and Name: Give your flow a descriptive name, like "Child - Get User Manager Info."
Step-by-Step: Calling the Child from the Parent
- Open the Parent Flow: Navigate to your parent flow within the same solution.
- Add the Action: In the step where you want to call the child, click "Add an action." Search for "Run a Child Flow."
- Select the Flow: In the dropdown, select the child flow you just created.
- Provide Inputs: The action will automatically display the fields you defined in your child flow's trigger. Enter the values from your parent flow into these fields.
- Use the Outputs: Once the "Run a Child Flow" step completes, the output variables you defined in the "Respond to a PowerApp or flow" action will be available as dynamic content in the subsequent steps of your parent flow.
Note: A child flow must be turned "On" (activated) before it will appear in the selection list when you try to add the "Run a Child Flow" action in your parent flow. If you do not see your flow in the list, verify that it is saved and enabled.
Not read yet
Advanced Data Passing Techniques
While passing a single string or number is straightforward, real-world scenarios often require passing large datasets, arrays of objects, or complex JSON structures. Managing these requires a deeper understanding of how Power Automate handles data types.
Passing JSON Objects
If you need to pass multiple related pieces of data, it is often more efficient to pass a single JSON object rather than ten individual inputs. For example, if you are creating a new project in a database, you might need to pass ProjectName, StartDate, Budget, and OwnerID.
Instead of creating four separate inputs in your Child Flow, you can create one input called ProjectDetails of type "Text." In your Parent Flow, you use a "Compose" action to create a JSON object:
{
"ProjectName": "Migration 2024",
"StartDate": "2024-06-01",
"Budget": 50000,
"OwnerID": "[email protected]"
}
In your Child Flow, you use the "Parse JSON" action immediately after the trigger to convert that text string back into usable dynamic content. This keeps your interface clean and makes the flow more resilient to future changes. If you need to add a new field to the project later, you simply update the JSON structure without having to reconfigure the input schema of your child flow trigger.
Handling Arrays
If you need to pass a list of items to a child flow (e.g., a list of orders to be processed), you can pass the array directly as a string or a JSON object. Inside the child flow, use the "Parse JSON" action with a schema that defines the array structure. You can then use an "Apply to each" loop to process the items.
Warning: Be mindful of the payload size. While Power Automate handles large amounts of data, there are limits to the size of the data that can be passed between flows. For extremely large datasets (e.g., thousands of rows), it is better to pass a reference (like a SharePoint list ID or a file path) rather than the raw data itself.
Not read yet
Best Practices and Industry Standards
To ensure your automations remain scalable and maintainable, follow these industry-standard practices when working with child flows.
1. Naming Conventions
Adopt a strict naming convention for your flows. Use prefixes like Child - or Sub - for child flows and Parent - or Main - for parent flows. This makes it immediately obvious to any developer looking at your Solution list which flows are meant to be called by others.
2. Error Handling
Child flows are independent, which means if they fail, the parent flow needs to know. By default, if a child flow fails, the "Run a Child Flow" action will fail, and the parent flow will stop. You can customize this behavior by using "Configure Run After" on the action immediately following the child flow call. You can set it to run even if the child flow fails, allowing the parent flow to perform error logging or notify an administrator.
3. Documentation
Because the logic is hidden inside a child flow, it can be difficult for a new developer to understand the full process. Always use the "Comments" feature in the Power Automate designer to explain what the child flow expects as input and what it provides as output.
4. Solution Organization
Always keep your parent and child flows in the same solution. This ensures that when you export your solution to move it to another environment (e.g., from Dev to Production), the relationship between the flows is preserved. If you reference a child flow from a different solution, you risk breaking the connection during deployment.
5. Versioning and Testing
When you make changes to a child flow, remember that those changes are immediately "live" for every parent flow that calls it. This is a double-edged sword. If you introduce a bug in the child, you break every parent. Always test your child flow in a development environment thoroughly before updating the version used by your production parent flows.
Not read yet
Comparison: Standard Flow vs. Child Flow
| Feature | Standard Flow | Child Flow |
|---|---|---|
| Trigger | Event-based (SharePoint, Outlook, etc.) | Power Apps or Flow (Manual) |
| Reusability | Low (Logic is locked in one flow) | High (Can be called by many parents) |
| Complexity | High (Monolithic, hard to debug) | Low (Focused on a single task) |
| Deployment | Independent | Must be in a Solution |
| Data Passing | Internal variables | Explicit Inputs/Outputs |
Common Pitfalls and How to Avoid Them
Even experienced developers encounter issues when working with child flows. Here are the most frequent mistakes and how to steer clear of them.
Pitfall 1: The "Invisible" Flow
The Scenario: You have created a child flow, but when you go to your parent flow to add the "Run a Child Flow" action, it does not show up in the list. The Fix: First, ensure the flow is turned on. Second, ensure that the flow is saved within a Solution. If you created the flow from the "My Flows" tab instead of the "Solutions" tab, it will not be eligible to be a child flow. You must move or recreate the flow within a solution.
Pitfall 2: Over-Engineering
The Scenario: You create a child flow for every single action, resulting in a parent flow that calls 20 different child flows. The Fix: This is "over-modularization." It makes the parent flow hard to follow because you have to jump between tabs to see the logic. Only create child flows for reusable logic or to hide extremely complex, repetitive steps. If the logic is unique to one process, keep it in the main flow.
Pitfall 3: Tight Coupling
The Scenario: Your child flow relies on specific global variables or triggers from the parent that aren't passed as inputs. The Fix: A child flow should be "stateless." It should only know what you tell it via the inputs. If you find yourself needing to reach "outside" the child flow to get data, you are creating a dependency that will break when you try to reuse that child flow elsewhere.
Pitfall 4: Ignoring the "Run After" Settings
The Scenario: A child flow fails, and the parent flow stops entirely, leaving the user with no notification or way to recover. The Fix: Use the "Configure Run After" setting on the parent flow's subsequent actions. If your child flow is critical, add a parallel branch that triggers only if the "Run a Child Flow" action fails. This branch can send an email to the IT support team with the error details.
Not read yet
Real-World Example: A Dynamic Approval System
Let’s look at a practical application: an approval system. You have multiple departments—Finance, HR, and IT—all of which need to approve requests. Instead of creating three separate flows, you create one "Child - Dynamic Approval" flow.
Child Flow Inputs:
ApproverEmail(The person who needs to approve)RequestDetails(The content of the request)ApprovalDeadline(How long they have to respond)
Child Flow Logic:
- The child flow uses the "Start and wait for an approval" action using the inputs provided.
- It then checks the outcome.
- It sends a response back to the parent indicating "Approved" or "Rejected."
Parent Flow (HR Request):
- The parent flow gathers the HR-specific data.
- It calls the
Child - Dynamic Approvalflow, passing the HR Manager's email as theApproverEmail. - It receives the result and proceeds to update the HR SharePoint list.
Parent Flow (IT Request):
- The parent flow gathers the IT-specific data.
- It calls the same
Child - Dynamic Approvalflow, passing the IT Manager's email. - The same logic is reused, ensuring that if you ever decide to add a "Reminder" feature to the approval, you only update the child flow once.
This approach saves hours of development time and ensures consistency across your company's automated processes.
Not read yet
Troubleshooting and Debugging Tips
When things go wrong in a parent-child relationship, the debugging process is slightly more involved. Here is how to efficiently track down issues:
- The Run History: When a parent flow fails, go to the "Run History" in the Power Automate portal. Click on the parent flow run. You will see the "Run a Child Flow" action. If it failed, click on that specific action. You will often see a link to "View child flow run." Click this link; it will take you directly to the specific run of the child flow that was triggered by that parent.
- Check the Inputs: Once in the child flow run history, verify the inputs. Did the parent pass the data you expected? Sometimes the parent passes an empty string or a null value, which causes the child flow to fail immediately.
- Validate the Response: If the child flow runs successfully but the parent flow receives the wrong data, check the "Respond to a PowerApp or flow" action in the child flow. Ensure the output names match exactly what the parent is looking for.
- Use Compose for Debugging: If you are passing complex JSON, insert a "Compose" action at the very top of your child flow and map the input to it. This allows you to see exactly what the raw input looks like in the run history, which is much easier than trying to parse it through the trigger object.
Not read yet
FAQ: Common Questions
Q: Can I nest child flows (a child calling another child)? A: Yes, you can. This is called "nested flows." However, be careful. Deep nesting makes it very difficult to track the flow of data and debug errors. Keep your nesting to a maximum of two or three levels if possible.
Q: Is there a performance penalty for using child flows? A: There is a negligible overhead for the system to initiate a child flow, but in most business automation scenarios, this is not noticeable. The benefits of maintainability far outweigh the millisecond difference in execution time.
Q: Can a child flow be triggered by multiple different parent flows? A: Absolutely. This is the primary purpose of child flows. You can have a "Logging" child flow that is called by every single flow in your environment to write errors to a central SharePoint list.
Q: Do I need a special license for child flows? A: Child flows are a standard feature of Power Automate, but they do require the use of Dataverse solutions. Ensure your organization has the appropriate licensing to create solutions, which is standard for most business-tier Microsoft 365 plans.
Not read yet
Key Takeaways
- Modularity is Key: Shift your mindset from building long, linear flows to building small, specialized modules. This reduces complexity and makes your automations easier to maintain and update.
- Use the Right Trigger: Always use the "Power Apps or Flow" trigger when creating a child flow. This is the only way to enable the "Run a Child Flow" action in the parent.
- Data Contracts Matter: Define your inputs and outputs clearly. Using JSON objects for complex data passing is a professional standard that keeps your interfaces clean and extensible.
- Solutions are Mandatory: Child flows must live inside a Dataverse Solution. This is not just a structural requirement; it is critical for successful application lifecycle management (ALM) and moving your automations between environments.
- Error Handling is a Shared Responsibility: Don't assume the child flow will succeed. Use "Configure Run After" in the parent flow to handle potential failures gracefully, ensuring your overall system remains resilient.
- Maintainability Over Everything: By centralizing logic (like approvals or logging) into child flows, you ensure that future changes only need to be made in one location, drastically reducing the risk of bugs and inconsistencies across your organization.
- Document Your Work: Because child flows are decoupled from the main process, use comments and clear naming conventions to ensure that any developer—including your future self—can understand how the parent and child interact.
By mastering these concepts, you are moving beyond simple automation and into the realm of professional systems architecture. This approach will allow you to build sophisticated, reliable, and scalable processes that stand the test of time.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Leveraging the Power Automate Ecosystem
- Leveraging the Power Automate Ecosystem Quiz5q
- Cloud Flows vs Desktop Flows
- Cloud Flows vs Desktop Flows Quiz5q
- Designing Desktop and Cloud Flow Automations
- Designing Desktop and Cloud Flow Automations Quiz5q
- Trigger Types for Cloud Flows
- Trigger Types for Cloud Flows Quiz5q
- Target Application and Browser Interactions
- Target Application and Browser Interactions Quiz5q
- Methods for Running Desktop Flows
- Methods for Running Desktop Flows Quiz5q
- Concurrent Flow Execution
- Concurrent Flow Execution Quiz5q
- Attended vs Unattended Desktop Flows
- Attended vs Unattended Desktop Flows Quiz5q
- HTTP Actions in Cloud and Desktop Flows
- HTTP Actions in Cloud and Desktop Flows Quiz5q
- Work Queues for Automation
- Work Queues for Automation Quiz5q
- Designing Custom Actions
- Designing Custom Actions Quiz5q
- Cloud Flow Calling Desktop Flow
- Cloud Flow Calling Desktop Flow Quiz5q
- Child Cloud Flows and Data Passing
- Child Cloud Flows and Data Passing Quiz5q
- External API Calls in Cloud Flows
- External API Calls in Cloud Flows Quiz5q
- Trigger Conditions and Concurrency
- Trigger Conditions and Concurrency Quiz5q
- Timeout and Retry Policies
- Timeout and Retry Policies Quiz5q
- Data Objects and Operations in Cloud Flows
- Data Objects and Operations in Cloud Flows Quiz5q
- Text Parsing JSON XML CSV
- Text Parsing JSON XML CSV Quiz5q
- UI Options in Desktop Flows
- UI Options in Desktop Flows Quiz5q
- Datatables Lists and Custom Objects
- Datatables Lists and Custom Objects Quiz5q
- Subflows in Desktop Flows
- Subflows in Desktop Flows Quiz5q
- External APIs in Desktop Flows
- External APIs in Desktop Flows Quiz5q
- Timeout and Retry in Desktop Flows
- Timeout and Retry in Desktop Flows Quiz5q
- Custom Actions in Desktop Flows
- Custom Actions in Desktop Flows Quiz5q
- Flow Control and Loops
- Flow Control and Loops Quiz5q
- Expressions in Cloud Flows
- Expressions in Cloud Flows Quiz5q
- Variable Actions for Flows
- Variable Actions for Flows Quiz5q
- Secure Input and Output Data
- Secure Input and Output Data Quiz5q
- Desktop Flow Priority and Queues
- Desktop Flow Priority and Queues Quiz5q
- Exception Handling Blocks
- Exception Handling Blocks Quiz5q
- Business Exception Error Handling
- Business Exception Error Handling Quiz5q
- Work Queues in Flows
- Work Queues in Flows Quiz5q
- Building a Custom Connector
- Building a Custom Connector Quiz5q
- Custom Connector Authentication
- Custom Connector Authentication Quiz5q
- Custom Connector Policy Templates
- Custom Connector Policy Templates Quiz5q
- Code in Custom Connectors
- Code in Custom Connectors Quiz5q
- Credential Management Practices
- Credential Management Practices Quiz5q
- On-Premises Data Gateway
- On-Premises Data Gateway Quiz5q
- Dataverse Solutions Components
- Dataverse Solutions Components Quiz5q
- Machine and Machine Group Requirements
- Machine and Machine Group Requirements Quiz5q
- Machine Registration Management
- Machine Registration Management Quiz5q
- Machine Group Management
- Machine Group Management Quiz5q
- Load Balancing Desktop Flows
- Load Balancing Desktop Flows Quiz5q
- Run Queue Operations
- Run Queue Operations Quiz5q
- Analyzing Flow Run History
- Analyzing Flow Run History Quiz5q
- Power Automate Analytics Dashboard
- Power Automate Analytics Dashboard Quiz5q
- Desktop Flow Monitoring
- Desktop Flow Monitoring Quiz5q
- Automation Performance Optimization
- Automation Performance Optimization Quiz5q
- Troubleshooting Flow Failures
- Troubleshooting Flow Failures Quiz5q
- Center of Excellence RPA Analytics
- Center of Excellence RPA Analytics Quiz5q
No PL-500 practice exam yet
Your points already work on 76 Amazon, CompTIA and Microsoft exams.
See the exams