Skip to main content
Community site session details

Community site session details

Session Id : F798ASJ7Iv2+iOzH/n3se9
Power Automate - Power Automate Desktop
Unanswered

Make Power Automate remember my previous variables even when the flow stops

Like (1) ShareShare
ReportReport
Posted on 26 Jul 2023 23:28:04 by 50

Hi community,

 

Many thanks for your help always.

I don't know if it is just me that has issue with this, but when a flow stops it forgets all its flow variables

so when I restart the flow I have to all start from the very beginning.

Is there a way to make RPA remember its previous flow variables?

 

  • jesse535 Profile Picture
    28 on 04 Mar 2024 at 16:44:28
    Re: Make Power Automate remember my previous variables even when the flow stops

    OK, but that is a lot of work if you have a dozen or so variables and suddenly your script crashes and you just want to fix the last line with the error. You have to go through a process that may take several minutes just to test one line and then repeat every time until you've debugged it. It would be much, much easier just to run from the line you want while keeping the data already stored.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on 31 Jul 2023 at 03:41:37
    Re: Make Power Automate remember my previous variables even when the flow stops

    It's stored as a text string. Use Split text to split it into a list.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • yiyi Profile Picture
    50 on 31 Jul 2023 at 01:46:42
    Re: Make Power Automate remember my previous variables even when the flow stops

    When setting the flow variable to environment variable, I cannot seem to use "for each...in..." with the new environment variable.

    Anyways to go around about it?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on 27 Jul 2023 at 06:37:30
    Re: Make Power Automate remember my previous variables even when the flow stops

    Environment variables can be set/cleared manually via the System Properties on Windows. I wouldn't really say there are any serious downsides, other than maybe some limitations to what you can store there.

    As to simple files, you could simply use Write text to file to write to a txt file or Write to CSV file if you want to store a data table, as storing it in CSV makes more sense.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • MichaelAnnis Profile Picture
    5,721 Super User 2025 Season 1 on 27 Jul 2023 at 06:36:06
    Re: Make Power Automate remember my previous variables even when the flow stops

    If you choose to use environment variables, you simply “set environment variable” when you want to overwrite or “get environment variable” when you want to call it. 

  • yiyi Profile Picture
    50 on 27 Jul 2023 at 06:27:58
    Re: Make Power Automate remember my previous variables even when the flow stops

    @Agnius 

    If I choose to store it into some simple files, what action should I use?

  • yiyi Profile Picture
    50 on 27 Jul 2023 at 06:26:49
    Re: Make Power Automate remember my previous variables even when the flow stops

    @MichaelAnnis @Agnius 

    Thank you for your sugguestion!

    Any downside of using windows environment variables.

    Can they be overwritten or cleared out when not needed?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on 27 Jul 2023 at 03:48:05
    Re: Make Power Automate remember my previous variables even when the flow stops

    Power Automate Desktop does not have the possibility of storing variable values between flow runs. If you need to have those values available for your next run, you would need to store them somewhere. One possibility is the Windows environment variables like @MichaelAnnis suggested. Other options include some simple files (like a plain text file or CSV) that are easier to read than your normal input flow, a database, a SharePoint list or something like that.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • MichaelAnnis Profile Picture
    5,721 Super User 2025 Season 1 on 27 Jul 2023 at 02:28:34
    Re: Make Power Automate remember my previous variables even when the flow stops

    If you are just trying to test your current flow, I recommend just adding the fixed variable temporarily into the place you want to “run from here”. 

    Otherwise, you could “save” the variables to environment variables. You would need to know where the breaks occur and pull these in through something similar to the following example:

     

    if %var1% isempty

        Get env Var %env_var1%
    end if

     

    Good luck!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1