How to Replace Double Quote with Single Quote using Power Automate?

Are you trying to replace a double quote with a single quote using Power Automate?

I will help you with this.

In this tutorial, I will explain how to replace double quotes with single quotes using Power Automate.

Replace Double Quote with Single Quote using Power Automate

To explain this example, I will manually take a text string surrounded by double quotes. Below, you can see the string with double quotes:

"Product Name" : "Laptop", "Price" : "75000", "Warranty" : "2 Years"

Now, I wanted to replace the double quotes in the string mentioned above with single quotes using Power Automate.

Check out the steps below to know how to do it:

  1. Open the Power Automate Home page by typing make.powerautomate.com in the browser. Click on + Create” and then select “Instant Cloud Flow.” Select ‘Manually trigger a flow,’ and then click the Create button.
  2. Then, declare a text string value in a variable that can be used in the following steps. So, add an ‘Initialize variable‘ action and set the name for the variable, type as ‘String‘, and value with the text mentioned above.
Replace Double Quote with Single Quote Power Automate
  1. After that, take a ‘Compose‘ action to use the replace() expression that replaces double quotes with single quotes.
    • Inputs: Insert the expression placed in the code below.
replace(variables('VarProducts'),'"','''')

Note:

To replace the double quotes with single quotes in a string, you need to use two single quotes in the replace expression. 

Power Automate Replace Double Quote with Single Quote

The flow is completed now.

  1. Next, click on the save icon to save the flow. Test the flow. On the Runflow window, select the Manual radio button, and click on the Runflow button.
  2. When the flow is executed, check the compose outputs for the result obtained. Refer to the image below.

Output: Replaced string with single quotes

Power Automate Replace Double Quote with Single Quote in string

Now you know how to replace double quotes with single quotes in a string using Power Automate!

If you found this guide helpful, feel free to share your feedback or suggestions in the comments below.

You might also be interested in these Power Automate tutorials:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…