Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 1qyuuuH21qYrjKYhlbLTTD
Power Automate - Power Automate Desktop
Unanswered

Passing dynamic arguments between flows (strictly in PAD)

Like (1) ShareShare
ReportReport
Posted on 25 Jul 2024 00:32:16 by 2
I am trying to convert an automation built with UiPath into Power Automate Desktop. In my UiPath automation, I have a workflow called "Read_Data" that receives and reads an Excel file and outputs a data table. So my "in" argument would be a string file path, and my "out" argument would be a data table from the bot reading the Excel file. Each time I call "Read_Data," I can pass in a different file path and receive a new out argument that I can then set to a new variable.
 
I am trying to do the same thing in PAD (and I can ONLY use PAD - not any cloud flows), but can't figure out how to pass dynamic variables into a subflow. I understand that the variables you create in Main and in subflows can all be accessed by each other, but my issue is that I want to invoke my subflow with a different file each time, have the subflow read that file and output me a new data table that I can then assign to a variable in Main. 
 
One solution I've seen online has been to add the files to a list and call the subflow when you iterate over the list using a "for each." This half-works for me - I can add my files to a list and iterate over them, but I get stuck when I want to assign variables to the outputted data table from the subflow. 
 
Is this kind of scenario possible with only using PAD? This starts to get into more of the realm of OOP and I'm not sure if PAD was designed for that purpose. 
 
Thank you!
Angela
Categories:
  • Suggested answer
    VishnuReddy1997 Profile Picture
    2,324 Super User 2025 Season 1 on 25 Jul 2024 at 05:30:46
    Passing dynamic arguments between flows (strictly in PAD)
    Hey Hi,
     
    In PAD,when you create a variable in the Flow Variables,they are treated as Gloabl Variables.
     
    Global variables in PAD are accessible across all flows and their values persist until the PAD is closed. So, you can use them to pass dynamic arguments between flows.
     
    (Note:- if you got your solution you can mark as solution and gives kudos)

    Thanks & Regards
    Vishnu Reddy
  • Suggested answer
    Deenuji_Loganathan_ Profile Picture
    6,105 Super User 2025 Season 1 on 25 Jul 2024 at 05:05:49
    Passing dynamic arguments between flows (strictly in PAD)
    Hello,

    In Power Automate Desktop, unlike in UIPath, you cannot create subflow variables within separate scopes. Therefore, variables created in the main flow must also be accessible in subflows. This includes variables like file paths and output data tables that are created and passed or retrieved as outputs.

    Alternatively, you can create a separate flow specifically for reading Excel files. This flow would have an input variable for the file path and an output variable for the data table. You can then invoke this "read Excel desktop flow" from within your main flow as needed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard