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:
  • Suggested answer
    David_MA Profile Picture
    15,587 Super User 2026 Season 2 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,607 Super User 2026 Season 2 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

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 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard