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 Automate
Answered

Syntax error

(0) ShareShare
ReportReport
Posted on by 48
Dear team,
 
I am assigning a variable, the value is URL and it contain % in the middle of the text. but when assign it's showing a syntax error. kindly help how can we assign a value which contain % in the middle of the text.
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    14,274 Super User 2026 Season 1 on at
    If you need to use `%` as a literal character in a URL, it must be encoded as `%25`. Using `%` alone without encoding can cause issues, as it might be interpreted as the start of a percent-encoded character sequence. For further reference: URL Encoding and what characters are valid in a URI
     
    If that doesn't resolve your issue, please show how the action is configured, the URL being used to set the variable, and the error message you are getting. 
  • Verified answer
    eetuRobo Profile Picture
    4,519 Super User 2026 Season 1 on at
    Are you using Power Automate Desktop or Power Automate Cloud? If its Power Automate Cloud then do as @David_MA  suggested.

    In Power Automate Desktop (windows desktop application) you want to add an extra % -sing. So if the URL is "www.example.com/lets%20automate" then it needs to be "www.example.com/lets%%20automate". So you just add an extra percent sign since otherwise PAD thinks there is a variable reference that is not closed since PAD uses % -sings to refer to variables.

    So syntax error:


    No syntax error with the extra % -sign:



    Or you can make be be string: %'www.example.com/lets%20automate'%

     
  • BS-13080552-0 Profile Picture
    48 on at
    Thanks @eetuRobo and @David_MA
     
    I was using PAD. Thanks a lot

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 604

#2
Valantis Profile Picture

Valantis 502

#3
Vish WR Profile Picture

Vish WR 417

Last 30 days Overall leaderboard