Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Double quotes in JSON string causing flow to fail

(0) ShareShare
ReportReport
Posted on by 34

Hello,

I have a vague understanding of what is occurring here but not a suitable solution. I have a flow that pulls information from fields in a PowerApp and collects them for an email. One of the fields is free text entry; as the title suggests the flow failed because a user had double quotes (") in the text:

dougofakkad_1-1707400652482.png

 

Aside from telling users not to use double quotes for now, I'm unsure how to deal with this. This is something I;ve cobbled together from various tutorials without much experience, so whehn things go wrong I'm kind of stuck.

If anyone has any suggestions of further information is required, please let me know.

 

edit: I was using this tutorial to create the flow initially:
https://immersivecoder.com/2020/03/11/how-to-parse-json-object-and-get-variable-values-in-power-automateflow-part-2/

 

I note that one of the functions is removing backslash characters, used to separate values:

replace(variables('ObjString'),'\','

I wonder if this is causing the issue, since it is also removing \ when used to escape characters.

  • dougofakkad Profile Picture
    34 on at
    Re: Double quotes in JSON string causing flow to fail

    Thank you for your patience @Matthy79 . I have it working correctly in a test flow.

  • Verified answer
    Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Double quotes in JSON string causing flow to fail

    Hello @dougofakkad 

     

    On the left side (1) is the unique name of the field (not really but say it is) and this is what you see when you want to run the flow in PowerApps. The right side (2) is just an additional help information. It should be displayed as help in PowerApps but this is a bug. It is visible when you call that flow in different other ways.

     

    If you run the flow you say "FlowName.Run(param1, param2, param3, ...)"

     

    If you decide to submit a JSON Object in one of these parameters, you will need to parse the text input to tell the flow what schema the JSON has. In that case you use "json(paramX)" as input in parse JSON and for the schema it is the best way to pick a previous run and learn it that way.

  • dougofakkad Profile Picture
    34 on at
    Re: Double quotes in JSON string causing flow to fail

    Hi @Matthy79 ,

     

    2. I used JSON because I found a tutorial that described it in my scenario and it worked. I'm not really sure how PowerApps V2 works and I am having some difficulty finding a resource on it that assumes no prior knowledge.

    dougofakkad_1-1707729016448.png

    Does field 1 simply equate to my field names in the PowerApp? What is field 2 for?

    If field 1 is simply my field name, how would I get a name, email and other details from a single people picker field in the PowerApp?

     

     

  • Verified answer
    Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Double quotes in JSON string causing flow to fail

    Hello @dougofakkad

     

    1.) Don’t use Manually trigger for your use case. PowerApps v2 is fine for this scenario so stick with it.

     

    2.) Why do you need Parse JSON if you provide different values in different fields? The trigger already provides the dynamic content for you.


    3.) If you have “ in JSON you have to escape it. You can replace all “ with \”

  • Verified answer
    dougofakkad Profile Picture
    34 on at
    Re: Double quotes in JSON string causing flow to fail

    Hi Yueyun,

    Thank you for your reply.

    I'm not sure I have the necessary experience with Power Automate to properly express what I don't understand about your instructions or what I would need from you to correct my flow. All the tutorials I can find seem to start in the middle and assume prior knowledge; I've built these largely by trial and error from those. I will attempt to ask the questions I think I need the answers to.

     

    1. is 'Manually Trigger a Flow' functionally equivalent to 'PowerApps (V2)' in my case? It seems to have the same parameters. The flow is triggered from a button in PowerApps.

     

    2. I'm not sure I understand your image. You've entered field names and field content in the same box? Isn't the content drawn from the PowerApp, i.e. something like this?

    dougofakkad_0-1707495005722.png

     

    3. If a field is a people picker, and I want to draw a name and email address separately from the same field, how would I do that using this method?

     

    Thank you for your assistance so far.

  • v-yueyun-msft Profile Picture
    on at
    Re: Double quotes in JSON string causing flow to fail

    Hi , @dougofakkad 

    According to your description, you want to parse the json string from Power app in your flow.

    As for your need , you can do not need to use the "Parse json" action.

    Here this is my test flow you can refer to :

    vyueyunmsft_0-1707442005003.png

    Then in each loop , you can see the value you need in the object.

    vyueyunmsft_1-1707442047649.png

     

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow