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 / Handling uriComponent(...
Power Automate
Answered

Handling uriComponent() with > 65519 characters count

(0) ShareShare
ReportReport
Posted on by 182

Hello lovely Community,

 

for an HTTP action I need to convert a String with > 65519 characters with uriComponent(). I've already recognized uriComponent() is limited to 65519:

 

Successfull with 65519 charactersSuccessfull with 65519 characters

 

Failed with 65520 charactersFailed with 65520 characters

 

Unfriendly Error Message:

"The template language function 'uricomponent' was invoked with invalid parameters. The parameter at index '0' cannot be converted to URI component."

 

So how I could handle my String to be able to encode it for URL with Power Automate? Unfortunately there's no special delimeter in string, its just a huge Token with random characters.

 

Already had thoughts about spliting the string to an array with items of 65519 characters. After I could set a Loop to convert it and then join every item back to my wanted uri string.

 

Many thanks for your help!

 

BR,

Sven

Categories:
I have the same question (0)
  • Verified answer
    KSven Profile Picture
    182 on at

    Just have created Workaround solution. Works great, but maybe someone know a more friendly way like uriComponent()..

     

    replace(
        replace(
            replace(
                replace(
                    replace(
                        replace(
                            replace(
                                replace(
                                    replace(
                                        replace(
                                            replace(
                                                replace(
                                                    replace(
                                                        replace(
                                                            replace(
                                                                replace(
                                                                    replace(
                                                                        replace(
                                                                            replace(
                                                                                'YOUR TEXT',
                                                                                '%'
                                                                                '%25'
                                                                            ),
                                                                            '*'
                                                                            '%2A'
                                                                        ),
                                                                        ''''
                                                                        '%27'
                                                                    ),
                                                                    '('
                                                                    '%28'
                                                                ),
                                                                ')'
                                                                '%29'
                                                            ),
                                                            ';'
                                                            '%3B'
                                                        ),
                                                        ':'
                                                        '%3A'
                                                    ),
                                                    '@'
                                                    '%40'
                                                ),
                                                '&',
                                                '%26'
                                            ),
                                            '=',
                                            '%3D'
                                        ),
                                        '+',
                                        '%2B'
                                    ),
                                    '$',
                                    '%24'
                                ),
                                ',',
                                '%2C'
                            ),
                            '/',
                            '%2F'
                        ),
                        '?'
                        '%3F'
                    ),
                    '!',
                    '%21'
                ),
                '#',
                '%23'
            ),
            '[',
            '%5B'
        ),
        ']',
        '%5D'
    )
     
    BR,
    Sven

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard