web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can you pass Output Va...
Power Automate
Unanswered

Can you pass Output Variables from PAD to Power Automate if the PAD flow fails or times out?

(0) ShareShare
ReportReport
Posted on by 2

I am creating some exception handling within a Power Automate Desktop Flow and trying to store where in the process it fails. The logs within the cloud are maxed out for the number of transactions, so I am setting an output variable and if the PAD flow fails I can tell which step the PAD flow timed out at.

 

Can you pass Output Variables from PAD to Power Automate if the PAD flow fails or times out?

I have the same question (0)
  • WillSG Profile Picture
    352 Moderator on at

    Hi @robertayoung  I hope you are doing well.

     

    Hmmmm that’s a good question, I can’t recall if that is possible, haven’t used it in way before.

     

    But you can have an Excel file assigned for a specific Bot or Multiple Bots, if PAD fail, you can make the automation open the Excel Log Issue File and record in the file the following:

    • Bot Name/Number
    • Issue which contains the action number and subflow if any
    • Time of issue
    • User ID

     

    Then save & close the Excel Log Issue File.

     

    Also, you can make the Bot send to you the issue via email, so you will know in advance that there is an issue, so you can act proactively.

     

    Those are just some ideas to overcome your situation, hope this helps, happy automation!,


    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.

     

    Additionally, I offer specialized consultancy and development services leveraging PAD. If you're interested in exploring these services further, feel free to DM me, and we can initiate a discussion.

     

    Finally, here is my LinkedIn Profile so you can connect with me.

     

    Kind regards,

     

    Will SG

    Managing Director & Automation Lead

    RAMS CR (Recruitment & Automation)

  • kinuasa Profile Picture
    801 Most Valuable Professional on at

    Power Automate for desktop allows you to set an error for each action.
    I suggest that setting a rule to set an arbitrary message as an output variables when an error occurs.

    PAD_Error_ OutputVariables.png

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @robertayoung - Hope You are doing well!!

     

    To pass some values from PAD to PA cloud, Please create some output variable like this.

    Deenuji_1-1708583984171.png

    Next, set up your error message to be assigned to your output variable and ensure that you choose "Continue flow run - Go to next action". This way, if the bot encounters a failure while relaunching the browser, it will proceed to the next step. However, if the bot fails during other actions, the value of the last error message won't be transmitted to the PA cloud flow.

     

    Deenuji_2-1708584078450.png

    Despite displaying a successful outcome, the bot failed to launch the Firefox browser. Consequently, the last error message will be displayed in the PA cloud like this.

    Deenuji_3-1708584503204.png

     

    Please find the below some best practices for same use case.

    1. Create Log file using "Write text to csv file" and capture the required details like Processing record number, Date and time, Action details with error and other parameters.

    2. Also you can write similar log into Excel files

    3. We can create custom action to log those parameters in data verse or some cloud datasource.

    4. Use work queues to capture all your transaction details along with exact status

     

     

    Thanks,

    Deenu

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you add an output variable to a PAD flow and if the variable has a value by the time the flow fails (i.e. if you actually set a value to that variable prior to the flow failing via some form of exception handling), it will be returned to your cloud flow. If your flow times out (as in it doesn't actually start due to being queued for too long), it won't initialize the variable and as such it won't return anything.

     

    So, it is possible for runtime errors, but not for your flow not starting.

     

    See here for reference on output variables: https://learn.microsoft.com/en-us/power-automate/desktop-flows/manage-variables#input-and-output-variables

     

    The other people in this thread have already provided some suggestions to how to actually handle errors. I assume you already know that. If you do not, please let me know and I'll come back with some suggestions/recommendations.

  • robertayoung Profile Picture
    2 on at

    The issue is not a question on how to populate output variables but can the output variables be passed to the PA flow after failure or timeout...

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I have replied to this above. Have you tried it?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard