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 / Variable in "text of f...
Power Automate
Answered

Variable in "text of file"

(0) ShareShare
ReportReport
Posted on by 6

Hello everyone,

 

if I use the "text of file" function and there is a variable in the text. How do I make sure that the variable is recognized and that he doesn't include the percent signs in the body text?

 

%Var% = "World"

text in the file: "Hello %Var%"

Function text of file: "Hello World" and not "Hello %Var%"

 

Any help will be much appreciated!

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Delete quotations and onec run

    %var%= world

    Or please show the flow for more clarification

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @JSB_SWB 

     

    I did not get what you meant by text of file function?

    could you give more clarification ?

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you mean that you're reading text from a file using the Read text from file action and you expect that a variable notation in the text will be automatically replaced with the variable value, that is not going to happen. This is not how it works at all.

     

    When you read text from file, it is read literally. The flow will assume your string says "Hello %var%" and will not understand that you want %var% in the string to be interpreted as an actual variable.

     

    A better approach would be to read the text from the file and then use Replace text on it to replace the placeholders in the text with variable values. If the placeholder is not found, nothing will be replaced, so this can be used dynamically.

    -------------------------------------------------------------------------
    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.

  • JSB_SWB Profile Picture
    6 on at

    Thank you very much, this solution worked well for me.

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
11manish Profile Picture

11manish 227

#2
David_MA Profile Picture

David_MA 204 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 177

Last 30 days Overall leaderboard