How to Remove Quotes from String in Power Automate?

Do you want to remove quotes from a string in Power Automate? I will explain, step by step, how to remove quotes from string in Power Automate. In addition, I will also explain how to escape double quotes from strings in Power Automate.

Scenario:

Recently, while working on the Product development, I needed to remove quotes from a String using flow; for example, My input string looks like the below:

'United States'

Once I remove single quotes from the input string, the output string value should be displayed as below:

United States

To meet this need, we will create a flow to remove quotes from a string using the Power Automate flow

Remove Quotes from a String in Power Automate

Let us see how to remove quotes from a string using Power Automate.

Example-1:

In this example, I’ll show you how to escape a single quote from the user input string value using flow

Step-1:

Create an instant cloud flow with a manual trigger; add a text input for the input String as shown below:

power automate remove quotes from string

Step-2:

Add a compose data operation and use the below expression to escape a single quote from the user input string value

replace(triggerBody()['text'],'''', '')
power automate remove single quotes from string

Step-3:

save and run the flow, Enter the input string value, and choose the run flow option. Here I have passed the input string value as ‘EnjoySharePoint’

how to remove quotes from string in Power Automate
  • Once the flow runs successfully, we can see the expected output in the compose data operation.
  • In the screenshot below, we notice it removes the single quote from the input string and displays the output value as EnjoySharePoint.
how to remove double quotes from string in Power Automate flow

This is how to remove quotes from the string using Power Automate flow.

Example-2:

In this example, I’ll show you how to remove quotes from a string of the StringValuewithSingleQuotes field presented in the SharePoint list.

Here, I am going to use the below Technology SharePoint list, which consists of

Column NameColumn Type
Technologydefault title column
StringValuewithSingleQuotesText column
EscapeSingleQuotesText Column
Remove quotes from string in Power Automate

Step-1:

Create an Automate cloud flow with a When an item is created trigger, Expand the trigger action and provide the required parameters

  • Site Address – Configure the SharePoint site address
  • List Name – select the SharePoint list name (here, I have selected my Technology SharePoint list)
Remove single quotes from string in Power Automate

Step-2:

Add a compose data operation, and from the dynamic content, select the StringValuewithSingleQuotes value

triggerOutputs()?['body/StringValuewithSingleQuotes']
Remove single quotes from string in Power Automate flow

Step-3:

Add another compose data operation, and use the below expression to escape single quotes of the StringValuewithSingleQuotes field value for the newly created list item.

replace(outputs('Get_String_Value'),'''', ' ')
how to remove single quotes from string in Power Automate

Step-4:

We will update the escaped single quote value to the EscapeSingleQuotes field presented in the SharePoint list

For that, Add a new step, choose the Update item action from action triggers, and provide the below parameters:

  • Site Address – From the dropdown, select the SharePoint site address
  • List Name – choose the SharePoint list; from the dropdown here, I have selected my Technology list
  • ID – choose the ID from the dynamic content value

In the EscapeSingleQuotes field, pass the below expression:

outputs('remove_single_quotes')
Remove single quotes from string using Power Automate

Step-5:

Save and run the flow; I have created the below-highlighted list item with the single-quoted value.

Remove single quotes from string using Power Automate flow

Once the flow runs successfully, like below:

power automate remove single quotes in string using flow

In the SharePoint list, the EscapeSingleQuotes field gets updated with the removed single quote string value using flow.

power automate remove single quotes from string using flow

This is how to remove quotes from the string and update the SharePoint field using flow.

Escape Double Quotes in Power Automate

Let us discuss how to remove double quotes from a string in Power Automate.

Example-1:

In this example, I’ll show you how to escape double quotes from the user input string value using flow.

Step-1:

Create an instant cloud flow with a manual trigger, Add a text input for the input String as shown below:

power automate remove double quotes from string

Step-2:

Add a compose data operation and use the below expression to escape double quotes from the user input string value.

replace(string(triggerBody()['text']),'"', '')
power automate escape double quote from string

Step-3:

save and run the flow, Enter the input string value, and choose the run flow option. Here, I have passed the input string value as “SPGuides”.

how to remove double quotes from string in Power Automate
  • Once the flow runs successfully, we can see the expected output in the compose data operation.
  • In the screenshot below, we can notice it removes the double quotes from the input string and displays the output value as SPGuides.
Remove double quotes from string in Power Automate

This is how to remove double quotes from a string in Power Automate.

Example-2:

In this example, I’ll show you how to remove double quotes from a string of the StringValuewithDoubleQuotes field presented in the SharePoint list.

Here, I am going to use the below Technology SharePoint list, which consists of

Column NameColumn Type
Technologydefault title column
StringValuewithDoubleQuotes Text Column
EscapeDoubleQuotesText column
power automate escape double quote in string

Step-1:

Create an Automate cloud flow with a When an item is created trigger, Expand the trigger action and provide the required parameters

  • Site Address – Configure the SharePoint site address
  • List Name – select the SharePoint list name (here, I have selected my Technology SharePoint list)
escape double quote from string in Power Automate

Step-2:

Add a compose data operation, and from the dynamic content, select the StringValuewithDoubleQuotes value

triggerOutputs()?['body/StringValuewithDoubleQuotes']
escape double quote from string in Power Automate flow

Step-3:

Add another compose data operation, and use the below expression to escape double quotes of the StringValuewithDoubleQuotes field value for the newly created list item.

replace(outputs('Get_String_Value'),'"', '')
escape double quote from string using Power Automate flow

ep-4:

We will update the escaped double quotes value to the EscapeDoubleQuotes field presented in the SharePoint list

For that, Add a new step, choose the Update item action from action triggers, and provide the below parameters:

  • Site Address – From the dropdown, select the SharePoint site address
  • List Name – choose the SharePoint list; from the dropdown here, I have selected my Technology list
  • ID – choose the ID from the dynamic content value

In the EscapeDoubleQuotes field, pass the below expression:

outputs('remove_double_quotes')
how to escape double quote from string in Power Automate

Step-5:

Save and run the flow; I have created the below-highlighted list item with the double-quoted value

how to escape double quote from string in Power Automate flow

Once the flow runs successfully, like below:

how to escape double quote from string using Power Automate flow

In the SharePoint list, the EscapeDoubleQuotes field gets updated with the removed double-quoted string value using flow.

escape double quote from string using flow

This is how to remove double quotes from a string in Power Automate.

Conclusion

I hope you understand how to remove quotes from a string using Power Automate.

Additionally, I have also explained how to remove double quotes from a string using flow

I have shown you different examples of removing single quotes from strings and escaping double quotes from strings by using the replace() function in Power Automate.

You may also like:

>