URL encode/decode(Power Automate Desktop)

Japanese version.

Learn how to perform URL encoding or decoding in Power Automate Desktop.

Steps

Use "Run JavaScript".

Encode

Use "encodeURI" if you do not want to encode meaningful characters in URLs such as "/" and "?"
If you want to encode them as well, use "encodeURIComponent".

WScript.StdOut.Write( encodeURI("text") ); 
WScript.StdOut.Write( encodeURIComponent("text") );

Running example.

URLhttps://www.samurai-emblem.com/?test=abc _()
encodeURIhttps://www.samurai-emblem.com/?test=abc%20_()
encodeURIComponenthttps%3A%2F%2Fwww.samurai-emblem.com%2F%3Ftest%3Dabc%20_()

Decode

decodeURI if it does not decode characters that make sense as URLs, such as "/" or "?

Use "decodeURI" if you do not want to decode meaningful URL characters such as "/" and "?".
If you want to decode them as well, use "decodeURIComponent".

WScript.StdOut.Write( decodeURI("text") ); 
WScript.StdOut.Write( decodeURIComponent("text") );
URLhttps%3A%2F%2Fwww.samurai-emblem.com%2F%3Ftest%3Dabc%20_()
decodeURIhttps%3A%2F%2Fwww.samurai-emblem.com%2F%3Ftest%3Dabc _()
decodeURIComponenthttps://www.samurai-emblem.com/?test=abc _()

For those who want to learn Power Automate Desktop effectively


The information on this site is now available in an easy-to-read e-book format.

Or Kindle Unlimited (unlimited reading).

You willl discover how to about basic operations.

By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.

Table of Contents.

Update History.

Links

Tips(Power Automate Desktop)