In Power Automate, to return a uniform resource identifier (URI) encoded version for a string by replacing URL-unsafe characters with escape characters we can use either encodeUriComponent or uriComponent functions in expressions
Also, to return a normal URL from URL Safe Characters embedded encoded URI decodeUriComponent function is used
Step 1 Login to the required Power Automate environment using URL make.powerautomate.com by providing the user name and password and click on Create on the left-hand side as shown in the below figure and after chose the Instant Cloud Flow
Step 2
After step 1, click on the trigger as Manually trigger a flow, and Give the Flow Name Then click on Create as shown in the figure below.
Step 3 After Step 2, Take the Initialize variable and Initialize variable is used to hold the URL that needs to be encoded, so provide the name as URL and Type as String and Value as https://testforencodeanddecode.com/
Step 4 After step 3, select an Action Compose
Step 5 After step 4, under Inputs click on Expression and type,
encodeUriComponent(variables(‘URL’)) (or) uriComponent(variables(‘Uri’))
Here encodeUriComponent() is the function and variables (‘Uri’) is the variable value which we received from step 3 as shown in the below figure.
Step 6
After step 5, we need to take another compose set the “Encode function” value into “Set Encode Value” as show in the bellow figure.
Step7
After step 6, take compose operation and name it as Compose – DecodeUriComponent and then under Inputs navigate to Expression Tab and then provide bellow code Syntax:
decodeUriComponent(outputs(‘Set_Encode_value’))
Step 8
After step 7, Click on Test -> Test Flow (Manually) and then click on Save & Test as shown in the below figure,
After flow is success run the outputs is given bellow
For any Help or Queries Contact us on info@crmonce.com or +918096556344
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.