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 / Reusing the output of ...
Power Automate
Unanswered

Reusing the output of a Variable in different actions/steps

(0) ShareShare
ReportReport
Posted on by 142

Hi,

 

I'm trying to reuse the same output from a variable in multiple steps but the second "call" for the value of the variable produces a blank e.g.:

This is the variable I want to use: 

JustAPACreator_0-1656070567342.png


When I use that variable output in the first email step it enters it fine and the email appears as it should:

JustAPACreator_1-1656070685514.pngJustAPACreator_2-1656070723372.png

But when I use it a second time in a 'Send an email' step further down it shows as a blank in the physical email that is sent and looking at the Run for that flow shows this (Wokka Woka is a fictional name FYI).The document name should've been in-between your and document but it's just blank:

JustAPACreator_3-1656070864521.png

JustAPACreator_4-1656070980510.png

How can I reuse variable outputs more than once in the same flow without having to create a unique one for every reference I want to use it for please?

Thanks is in advance.

Mark.

Categories:
  • VictorIvanidze Profile Picture
    13,083 on at

    Hello,

    you are using wrong terminology - I don't see any variable in your screenshot.

    Also please show the whole your flow.

  • CU31011410-0 Profile Picture
    142 on at

    Hi,

     

    Thanks for the questions, maybe you could help by advising what I am referencing as clearly I'm new and trying to learn?

    The whole flow is too big to post hence the parts that I thought would highlight the error.

    The aim was to use the "result" of the Compose - File Name "step" multiple times in a flow instead of just the first use "using it up" and any subsequent reference to it producing a blank.

    These are the "variables":

    JustAPACreator_0-1656074375318.png

    JustAPACreator_2-1656074710947.png


    Which does the leg work for this "action/step":

    JustAPACreator_1-1656074411434.png

     

    Which is then used in email one (Outputs):

    JustAPACreator_3-1656074763548.png

     

    Then in email two:

    JustAPACreator_4-1656074799506.png

     

    The two emails are under two Conditions which match based on the Form dynamic content matching and then sends the relevant email.

     

    Hope that helps.

     

    Mark.

  • VictorIvanidze Profile Picture
    13,083 on at

    It looks like the value of variable "Sanitise" and the output of Compose action are equal, correct?

    If so, try to use variables('Sanitise') instead of Outputs() in the emails.

  • CU31011410-0 Profile Picture
    142 on at

    Hi,

     

    Thanks for the quick response: I tried that and while one email (the original step that held the value) has the document name as expected the second still has a blank, exactly the same setup in both email steps/actions I even copied the body from the working one to the non-working one):

     

    JustAPACreator_0-1656076566242.png

    I just can't work out what I'm doing wrong, sorry.

  • VictorIvanidze Profile Picture
    13,083 on at

    Try to publish here the fragment of your flow that covers all places there "sanitise" variable exists.

  • CU31011410-0 Profile Picture
    142 on at

    Not a problem, so the main Flow branches into two. This is the right-side branch that deals with one company based on a condition that looks for the value from the Form, this is also the one that works and was created first in the Flow:

    JustAPACreator_2-1656080808186.png

     

    This is the second left-branch that deals with the other company (both are identical except company names and document filenames). This one doesn't work:

    JustAPACreator_1-1656080621261.png

     

    Hope they haven't come out too small for you, if you need anything further please let me know.

     

    Thank you for your time and trying to help, it is appreciate.

     

    Mark.

  • VictorIvanidze Profile Picture
    13,083 on at

    Where exactly do you see the blank document name? Mark these places.

  • CU31011410-0 Profile Picture
    142 on at

    Document name should be inserted from the "sanitise" variable highlighted here in both emails (I kept the old Output field in there so I could reference it later):

    JustAPACreator_5-1656084023751.png

     

    The "sanitise" should insert the document name and then the email should come through looking like this:

    JustAPACreator_2-1656083817440.png

    Instead it comes through looking like this (highlighted in yellow the space where the name should be) if I try to use the second branch which "reuses" the "sanitise" variable:

    JustAPACreator_3-1656083928696.png

    Helps that helps further.

  • VictorIvanidze Profile Picture
    13,083 on at

    Sorry I do no understand what is the second branch. If you cannot provide the whole picture I cannot help.

  • CU31011410-0 Profile Picture
    142 on at

    OK, let's try it this way:

    I've got a name from a Microsoft Form that has been cleaned and removed all the [ and " from the name.

    That's stored in a variable called sanitise.

    Sanitise is used in an email as Dynamic content.

    I use the Sanitise as Dynamic content to insert the document name into a "Send an email" action.

    This works if I only use it once in the Flow.

    If I try and use it again in another "Send an email" action the email doesn't contain the values in the Sanitise variable, it just equates to blank but the first email does have the values.

    Discovered I could zoom out (d'oh) so here's the entire process:

    JustAPACreator_0-1656087422753.png

    This branches to this part (right side (created first) works and left doesn't):

    JustAPACreator_2-1656087636140.png

     

     

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard