Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 3, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 3, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 3, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 3, 2025

      SteelSeries reveals new Arctis Nova 3 Wireless headset series for Xbox, PlayStation, Nintendo Switch, and PC

      June 3, 2025

      The Witcher 4 looks absolutely amazing in UE5 technical presentation at State of Unreal 2025

      June 3, 2025

      Razer’s having another go at making it so you never have to charge your wireless gaming mouse, and this time it might have nailed it

      June 3, 2025

      Alienware’s rumored laptop could be the first to feature NVIDIA’s revolutionary Arm-based APU

      June 3, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      easy-live2d – About Make your Live2D as easy to control as a pixi sprite! Live2D Web SDK based on Pixi.js.

      June 3, 2025
      Recent

      easy-live2d – About Make your Live2D as easy to control as a pixi sprite! Live2D Web SDK based on Pixi.js.

      June 3, 2025

      From Kitchen To Conversion

      June 3, 2025

      Perficient Included in Forrester’s AI Technical Services Landscape, Q2 2025

      June 3, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      SteelSeries reveals new Arctis Nova 3 Wireless headset series for Xbox, PlayStation, Nintendo Switch, and PC

      June 3, 2025
      Recent

      SteelSeries reveals new Arctis Nova 3 Wireless headset series for Xbox, PlayStation, Nintendo Switch, and PC

      June 3, 2025

      The Witcher 4 looks absolutely amazing in UE5 technical presentation at State of Unreal 2025

      June 3, 2025

      Razer’s having another go at making it so you never have to charge your wireless gaming mouse, and this time it might have nailed it

      June 3, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Part 1: Capture and Monitor Critical Power Automate Workflows History through Child Flow

    Part 1: Capture and Monitor Critical Power Automate Workflows History through Child Flow

    January 29, 2025

    Introduction:

    In today’s digital landscape, organizations increasingly rely on automated workflows to enhance efficiency and streamline processes. However, as these workflows grow in complexity, tracking their execution history becomes essential for ensuring reliability and facilitating troubleshooting.

    This blog explores a powerful approach to logging workflow running history using child flows in Power Automate. By leveraging child flows, users can capture critical data such as flow names, statuses, and execution URLs, storing this information in SharePoint or Dataverse tables for easy access and analysis.

    In this Blog Series, you will be briefly seeing these topics in two parts:

    • Part 1: Step-by-Step Guide — Creating a child flow to capture the necessary data for tracking your workflow execution history
    • Part 2: Step-by-Step Guide — Integrating Child flow to the Parent Flow & How to Access this child flow as a reusable template across the different projects or Teams.

    In this Part, you will introduce the concept of creating a child flow to get the necessary data.

    Prerequisites:

      • SharePoint or Dataverse: Ensure you have access to either SharePoint or Dataverse to store and manage your data.
      • Power Automate: A valid account to access Power Automate for creating and managing your workflows.

    Step-by-Step Guide:

    Now, let’s dive into the detailed process for creating flows in Power Automate.

    Setting Up in SharePoint or Dataverse

    1. Create a List or Table named “Log Workflow Histories.”
    2. Add the Following Columns:
    Column Name Data Type
    Flow Name Single Line of Text
    Flow Run URL Link / Hyperlink or Picture
    Flow Start Time Date and Time
    Flow End Time Date and Time
    Flow Status Single Line of Text

     

    Creating a Child Flow:

    1. Access Power Automate at Power Automate.
    2. Select “Solutions” from the left navigation pane.
    3. Open Your Existing Solution or create a new one by clicking “New Solution.”
    4. Create a Child Flow by navigating to:
      • All > New > Automation > Cloud Flow > Instant.
        1childflownav

    Step 1: Provide a Flow Name and Select the Manual Trigger

    Choose a descriptive name for your flow that clearly indicates its purpose. This helps in identifying the flow later.
    2flowhistory

    Step 2: Set Inputs in the Manual Trigger

    Input Source: The inputs for this flow will be provided by the parent flow. Ensure that the following inputs are configured to receive data from the parent flow:

    • Input 1: Workflow Object (Type: Text)
    • Input 2: Start Date and Time (Type: Text)
    • Input 3: End Date and Time (Type: Text)
    • Input 4: Workflow Status (Type: Text)

    3flowhistory

    4flowhistory

    Step 3: Add a Compose Action to Convert the Workflow Object to JSON Format.

    The Workflow Object we receive from the parent flow is in JSON format but is treated as a string in the manual trigger input. By converting it into a JSON object, we can easily extract specific information and manipulate the data as needed in subsequent steps of the flow.

    • Add a Compose Action:
      • Click on “+ New Step.”
      • Search for and select “Compose.”
    • Configure the Compose Action:
      • In the Inputs field of the Compose action, enter the following expression to convert the Workflow Object to JSON format: json(triggerBody()?['Workflow Object'])
        5flowhistory
        6flowhistory
        7flowhistory
        8flowhistory
    • Name the Compose Action (Optional but Best Practice):
      • You can rename the action to something descriptive, like “Convert Workflow Obj to JSON.” In this example, I have named “Convert to Obj”.

    Step 4: Add a Compose Action to Extract the Workflow Link

    This Compose action allows us to isolate and extract the workflow link from the previously converted JSON object. This makes it easier to use the link in further actions within the flow.

    • Add Another Compose Action:
      • Click on “+ New Step.”
      • Search for and select “Compose.”
    • Configure the Compose Action:
      • In the Inputs field of this Compose action, enter the expression to extract the workflow link.
      • The expression would be: concat('https://make.powerautomate.com/environments/',outputs('Convert_to_Obj')?['tags']?['environmentName'],'/flows/',outputs('Convert_to_Obj')?['name'],'/runs/',outputs('Convert_to_Obj')?['run']?['name'])
        ‘Convert_to_Obj’ – replace it with the name of your previous compose action.
        9flowhistory10flowhistory

    Step 5: Add another Compose Action to Extract the Flow Name

    Please revisit Step 4 and replace the current expression with the following. Additionally, rename the Compose action to “Workflow Name.”

    The Expression would be:outputs('Convert_to_Obj')?['tags']?['flowDisplayName']
    11childflownav
    12childflownav

    The extraction from the workflow object is now complete. Next, it’s time to add the item to either a SharePoint list or a Dataverse table.

    Step 6: Add an Item to SharePoint List

    • Add a New Step:
      • Click on “+ New Step.”
      • Search for and select “SharePoint” from the list of connectors.
        13childflownav
    • Choose Action:
      • Select the action “Create Item.”
        14childflownav
    • Configure the Create Item Action:
      • Site Address: Choose the SharePoint site where your list is located.
      • List Name: Select the “Log Workflow Histories” list you created earlier.
    • Map the Fields:
      Fill in the fields using the outputs from previous steps:
      • Workflow Name: Use the output from the “Workflow Name” Compose action.
      • Start Date and Time: Map this to the corresponding input from the manual trigger.
      • End Date and Time: Map this to the corresponding input from the manual trigger.
      • Workflow Status: Map this to the corresponding input from the manual trigger.
      • Workflow Link: Use the output from the Compose action that extracted the workflow link.
        15flowhistory

    You can follow either Step 6 or Step 7 based on your chosen data source—SharePoint or Dataverse. If you’re using SharePoint, refer to Step 6 for adding an item to the SharePoint list. If you’re using Dataverse, follow Step 7 to add a row to the Dataverse table.

    Step 7: Add an Item to Dataverse Table

    • Add a New Step:
      • Click on “+ New Step.”
      • Search for and select “Dataverse” from the list of connectors.
    • Choose Action:
      • Select the action “Add a Row.”
        16flowhistory
    • Configure the Add a Row Action:
      • Table Name: Select the Dataverse table where you want to add the item (e.g., “Log Workflow Histories”).
    • Map the Fields:
      Fill in the fields using outputs from previous steps:
      • Workflow Name: Use the output from the “Workflow Name” Compose action.
      • Start Date and Time: Map this to the corresponding input from the manual trigger.
      • End Date and Time: Map this to the corresponding input from the manual trigger.
      • Workflow Status: Map this to the corresponding input from the manual trigger.
      • Workflow Link: Use the output from the Compose action that extracted the workflow link.

    Conclusion:

    “In the first part, we’ve explored how to create the child flow. In the next part of this series, we’ll show you how to integrate this child flow into a parent flow and start capturing the history for your critical flows. “

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticlePart 2: Capture and Monitor Critical Power Automate Workflows History through Child Flow
    Next Article The Art of Writing Test Classes in Salesforce Apex

    Related Posts

    Security

    Alert: Malicious RubyGems Impersonate Fastlane Plugins, Steal CI/CD Data

    June 3, 2025
    Security

    Critical CVSS 9.6: IBM QRadar & Cloud Pak Security Flaws Exposed

    June 3, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    CodeSOD: intint

    News & Updates

    CVE-2025-5297 – SourceCodester Computer Store System Stack-Based Buffer Overflow Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Safely Modifying AEM Cloud Service UIs With App Builder Extension Points

    Development

    John Hopkins Researchers Introduce Genex: The AI Model that Imagines its Way through 3D Worlds

    Development

    Highlights

    Development

    Malicious Firmware Update Destroyed Over 600,000 Routers Across ISP

    May 30, 2024

    In one of the largest mass bricking events in history, at least 600,000 routers belonging…

    My favorite headphones for deep work and gaming get a travel-friendly upgrade

    January 6, 2025

    Windows 11 leak confirms a new UI for Xbox handhelds, points to “Gaming Posture”

    April 1, 2025

    CVE-2025-4431 – Unsplash WordPress Plugin Missing Capability Check Allows Unauthorized Data Modification

    May 30, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.